[PATCH] Object: Provide a richer means of describing auxiliary symbols

David Majnemer david.majnemer at gmail.com
Mon Mar 17 22:33:51 PDT 2014



================
Comment at: include/llvm/Support/COFF.h:383
@@ -373,1 +382,3 @@
+    uint32_t SymbolTableIndex;
+    char     unused2[12];
   };
----------------
Rui Ueyama wrote:
> If the definitions for Support/COFF.h are for in-memory representation of a COFF file, why do we need padding fields?
Strictly speaking, we do not.  However, I added them for consistency with the rest of the definitions.

We could remove the padding fields in another patch if you'd like, I'd rather not confuse the VCS history in this one.

================
Comment at: lib/Object/COFFYAML.cpp:217
@@ +216,3 @@
+  NSectionSelectionType(IO &)
+      : SelectionType(COFFYAML::COMDATType(0)) {}
+  NSectionSelectionType(IO &, uint8_t C)
----------------
Rui Ueyama wrote:
> Does 0 here mean nullptr? Should we use nullptr? (as C++11 is now allowed.)
It does not mean nullptr, it just means 0.

================
Comment at: tools/obj2yaml/coff2yaml.cpp:97
@@ +96,3 @@
+
+    if (Symbol->NumberOfAuxSymbols > 0) {
+      ArrayRef<uint8_t> AuxData = Obj.getSymbolAuxData(Symbol);
----------------
Rui Ueyama wrote:
> This piece of code looks a bit too large to insert into here. Can you make this a separate function?
Can do.


http://llvm-reviews.chandlerc.com/D3092



More information about the llvm-commits mailing list