diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp index 7a5c4f3136a..f3b871704d6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp @@ -210,12 +210,10 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) { if (auto *SP = getDISubprogram(GV)) FuncName = SP->getDisplayName(); - // 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 our DISubprogram name is empty, use the mangled name. if (FuncName.empty()) FuncName = GlobalValue::getRealLinkageName(GV->getName()); + // Emit a symbol subsection, required by VS2012+ to find function boundaries. MCSymbol *SymbolsBegin = Asm->MMI->getContext().createTempSymbol(), *SymbolsEnd = Asm->MMI->getContext().createTempSymbol(); |