[PATCH] D17882: [ELF] - unify the use of uint32_t instead of unsigned in Target class for relocations types

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 05:55:45 PST 2016


rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.

LGTM with nits

The part about using uint32_t for relocation type LGTM.  That is what getType in ELFTypes.h returns and we may as well just propagate it.


================
Comment at: ELF/Target.cpp:885
@@ -884,4 +884,3 @@
 // This function returns a number of relocations that need to be skipped.
-unsigned X86_64TargetInfo::relaxTls(uint8_t *Loc, uint8_t *BufEnd,
-                                    uint32_t Type, uint64_t P, uint64_t SA,
-                                    const SymbolBody *S) const {
+size_t X86_64TargetInfo::relaxTls(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
+                                  uint64_t P, uint64_t SA,
----------------
return unsigned for now.

================
Comment at: ELF/Target.h:72
@@ +71,3 @@
+  // This function returns how many relocations should be skipped from proccesssing.
+  virtual size_t relaxTls(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
+                          uint64_t P, uint64_t SA, const SymbolBody *S) const;
----------------
I would leave this one as unsigned. Or at least do it in another patch.


http://reviews.llvm.org/D17882





More information about the llvm-commits mailing list