[PATCH] D19570: [PDB] Parse module information from the DBI stream

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 18:22:42 PDT 2016


majnemer added a subscriber: majnemer.

================
Comment at: lib/DebugInfo/PDB/Raw/ModInfo.cpp:53-56
@@ +52,6 @@
+  ulittle16_t NumFiles;      // Number of files contributing to this module
+  ulittle32_t FileNameOffsets; // array of [0..NumFiles) DBI name buffer offsets
+                               // This field is a pointer in the reference
+                               // implementation, but as with `Mod`, we ignore
+                               // it for now since it is unused.
+  ulittle32_t SrcFileNameNI; // Name Index for src file name
----------------
Won't it be 64-bit in size on a 64-bit system?

================
Comment at: lib/DebugInfo/PDB/Raw/ModInfo.cpp:64
@@ +63,3 @@
+  StringRef getObjectFileName() const {
+    return StringRef(getModuleName().end() + 1);
+  }
----------------
Incrementing an iterator past end looks suspicious.


http://reviews.llvm.org/D19570





More information about the llvm-commits mailing list