This is an archive of the discontinued LLVM Phabricator instance.

Represent all addends with int64_t
ClosedPublic

Authored by rafael on Feb 14 2017, 8:49 AM.

Details

Reviewers
ruiu
grimar
Summary

Addends should always be signed.

In the target dependent code we already always return a int64_t. In the target independent code we carefully use uintX_t, which has the same result given 2 complement rules.

This just simplifies the code to use int64_t everywhere.

Diff Detail

Event Timeline

rafael created this revision.Feb 14 2017, 8:49 AM
ruiu accepted this revision.Feb 14 2017, 8:57 AM

LGTM.

Nice! We probably want to do more uintX -> uint64 conversions.

ELF/Relocations.h
125

Remove spaces around <>.

But do you need this? r_addend is a signed type, so it'll be implicitly sign-extended.

This revision is now accepted and ready to land.Feb 14 2017, 8:57 AM
grimar closed this revision.Aug 17 2017, 2:28 AM
grimar edited edge metadata.

r295263