[PATCH] D30959: [pdb] Add support for writing Module Info and module symbols

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 11:18:21 PDT 2017


inglorion added a comment.

Thanks for making it easy to write minimal PDBs! I added a couple of inline comments about the code.



================
Comment at: llvm/lib/DebugInfo/PDB/Native/ModInfoBuilder.cpp:56
+
+void ModInfoBuilder::setObjFileName(StringRef Name) { ObjFileName = Name; }
+
----------------
Having this as mutable state increases the surface where bugs can develop. Can we handle this some other way? For example, can we set it in the constructor?


================
Comment at: llvm/lib/DebugInfo/PDB/Native/ModInfoBuilder.cpp:79
+  Layout.LineBytes = 0;
+  (void)Layout.Mod;         // Set in constructor
+  (void)Layout.ModDiStream; // Set in finalizeMsfLayout
----------------
What does the comment here mean? What does this line do?


https://reviews.llvm.org/D30959





More information about the llvm-commits mailing list