[PATCH] D31090: [ELF] - Detemplate MipsGotSection<ELFT>

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 11:42:36 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Config.h:170
   bool is64() const { return EKind == ELF64LEKind || EKind == ELF64BEKind; }
+  unsigned size() const { return is64() ? 8 : 4; };
 
----------------
This is a sort of unrelated refactoring, so let's not do this in this patch. (Besides `size` is not a good name.)


================
Comment at: ELF/Config.h:214
+
+  llvm::support::endianness getEndian() const {
+    return (EKind == ELF32LEKind || EKind == ELF64LEKind)
----------------
I think endianness::little and endianness::bit are silly because there are only two endianness. This should return true or false. Can you rename this `isLE` and returns if it is a little endian?


https://reviews.llvm.org/D31090





More information about the llvm-commits mailing list