[PATCH] Object: Add support for bigobj

David Majnemer david.majnemer at gmail.com
Tue Sep 9 14:01:32 PDT 2014


================
Comment at: include/llvm/Object/COFF.h:72-73
@@ +71,4 @@
+  support::ulittle16_t Machine;
+  support::ulittle32_t TimeDateStamp;
+  support::ulittle8_t  UUID[16];
+  support::ulittle32_t unused1;
----------------
ruiu wrote:
> We have ulittle8_t and even ubig8_t? That made me think of the definition of endianness for a brief moment. It's weird at least.
Done.

================
Comment at: include/llvm/Object/COFF.h:231
@@ +230,3 @@
+  const void *getRawPtr() const {
+    return CS16 ? static_cast<const void *>(CS16) : CS32;
+  }
----------------
ruiu wrote:
> Why do you need to cast only CS16?
The right hand side will implicitly convert to const void * as well.

The cast is needed because the ternary operator will otherwise be unable to convert both arms of the expression to a common type.

================
Comment at: include/llvm/Object/COFF.h:248
@@ +247,3 @@
+        return CS16->SectionNumber;
+      return static_cast<int16_t>(CS16->SectionNumber);
+    }
----------------
ruiu wrote:
> This needs a comment saying that the reserved section numbers are returned as negative numbers.
Done.

================
Comment at: include/llvm/Object/COFF.h:427
@@ +426,3 @@
+public:
+  bool isReservedSectionNumber(int32_t SectionNumber) const {
+    if (SymbolTable16)
----------------
ruiu wrote:
> Do we still need this? Looks like we can now just use <=0.
Done.

http://reviews.llvm.org/D5259






More information about the llvm-commits mailing list