[PATCH] D11785: [llvm-symbolizer] Remove underscores and other C mangling on Windows

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 13:44:13 PDT 2015


samsonov added inline comments.

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:188
@@ -180,2 +187,3 @@
       }
+      LineInfo.IsWin32Symbol = isWin32Module();
       PatchedInlinedContext.addFrame(LineInfo);
----------------
Ah, sorry, I wasn't clear enough :(
See below.


================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:217
@@ -208,3 +216,3 @@
       DILineInfo LineInfo = InlinedContext.getFrame(i);
       Result += printDILineInfo(LineInfo);
     }
----------------
You can pass ModuleInfo* (or the kind of that object file) to `printDILineInfo` here.

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:233
@@ -224,3 +232,3 @@
       if (Info->symbolizeData(ModuleOffset, Name, Start, Size) && Opts.Demangle)
-        Name = DemangleName(Name);
+        Name = DemangleName(Name, Info->isWin32Module());
     }
----------------
and here

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:542
@@ -504,2 +541,3 @@
+                                         bool IsWin32Symbol) {
 #if !defined(_MSC_VER)
   // We can spoil names of symbols with C linkage, so use an heuristic
----------------
and use the type of object file here to figure out which demangling you should actually do


http://reviews.llvm.org/D11785





More information about the llvm-commits mailing list