mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Temporary fix for PR21528 - use mangled C++ function names in COFF debug info to un-break ASan on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -190,7 +190,14 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) {
|
||||
return;
|
||||
assert(FI.End && "Don't know where the function ends?");
|
||||
|
||||
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);
|
||||
// Emit a symbol subsection, required by VS2012+ to find function boundaries.
|
||||
MCSymbol *SymbolsBegin = Asm->MMI->getContext().CreateTempSymbol(),
|
||||
*SymbolsEnd = Asm->MMI->getContext().CreateTempSymbol();
|
||||
|
Reference in New Issue
Block a user