[llvm] r221813 - Temporary fix for PR21528 - use mangled C++ function names in COFF debug info to un-break ASan on Windows

Reid Kleckner rnk at google.com
Wed Nov 12 14:02:45 PST 2014


On Wed, Nov 12, 2014 at 12:21 PM, Timur Iskhodzhanov <timurrrr at google.com>
wrote:
>
> -  const StringRef FuncName = getDISubprogram(GV).getDisplayName();
> +  StringRef FuncName = getDISubprogram(GV).getDisplayName(),
> +            GVName = GV->getName();
> +  // FIXME Clang currently sets DisplayName to "bar" for a C++
> +  // "namespace_foo::bar" function, see PR21528.  Luckily, dbghelp.dll is
> trying
> +  // to demangle display names anyways, so let's just put a mangled name
> into
> +  // the symbols subsection until Clang gives us what we need.
> +  if (GVName.startswith("\01?"))
> +    FuncName = GVName.substr(1);
>

Just strip \01 unconditionally, no need to check for ?. Sometimes clang
produces names like \01 at foo@4 for this code:
extern "C" void __fastcall foo(int x) {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141112/737515f6/attachment.html>


More information about the llvm-commits mailing list