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

Reid Kleckner rnk at google.com
Wed Aug 5 16:17:31 PDT 2015


rnk added inline comments.

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:226
@@ -180,1 +225,3 @@
       }
+      if (Opts.Demangle && isWin32Module())
+        demangleCOFFExternCFunc(LineInfo);
----------------
samsonov wrote:
> This is not the place we demangle the function names - see `LLVMSymbolizer::DemangleName`. At that point we already lose the knowledge of whether the module was ELF, or COFF, or MachO, but is it that important? Also, why doesn't `::UnDecorateSymbolName` work for you?
Yes, it's important that we only do this for 32-bit x86 symbols, which requires looking at the machine type of the module. See isWin32Module().

UnDecorateSymbolName only handles C++ symbols. This won't interfere because C++ symbols all start with '?'.


http://reviews.llvm.org/D11785





More information about the llvm-commits mailing list