[PATCH] Make llvm-symbolizer work on Windows.

Timur Iskhodzhanov timurrrr at google.com
Fri Apr 24 10:03:37 PDT 2015


It's great to see how small the changes to the symbolizer code are!

I'll defer to Alexey for the review as I'm not at all familiar with the code.


================
Comment at: include/llvm/DebugInfo/PDB/PDBContext.h:23
@@ +22,3 @@
+/// PDBContext
+/// This data structure is the top level entity that deals with pdb debug
+/// information parsing.  This data structure exists only when there is a
----------------
nit: s/pdb/PDB/

================
Comment at: lib/DebugInfo/PDB/PDBContext.cpp:78
@@ +77,3 @@
+  DILineInfoTable Table;
+  auto LineNumbers = Session->findLineNumbersByAddress(Address, Size);
+  while (auto LineInfo = LineNumbers->getNext()) {
----------------
can this return `nullptr`?

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:472
@@ +471,3 @@
+  DIContext *Context = nullptr;
+  if (COFFObjectFile *CoffObject = dyn_cast<COFFObjectFile>(Objects.first)) {
+    // If this is a COFF object, assume it contains PDB debug information.  If
----------------
nit:
`if (X *x = dyn_cast<X>(...)) {` (1)
is not consistent with the other parts of the change where you use
`if (auto x = dyn_cast<X>(...)) {`

Personally I like the former (1) more.

http://reviews.llvm.org/D9234

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list