diff options
author | Reid Kleckner <rnk@google.com> | 2016-01-13 19:32:35 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-01-13 19:32:35 +0000 |
commit | 72e2ba7abb17a5d509df45451c546b9ac5de743f (patch) | |
tree | 209f68da6cef60b984bf971da7dfbbafba07a128 /llvm/lib/CodeGen | |
parent | a39ca601262f2709c5b936a25f3d99c35dc84411 (diff) | |
download | bcm5719-llvm-72e2ba7abb17a5d509df45451c546b9ac5de743f.tar.gz bcm5719-llvm-72e2ba7abb17a5d509df45451c546b9ac5de743f.zip |
[readobj] Expand CodeView dumping functionality
This rewrites and expands the existing codeview dumping functionality in
llvm-readobj using techniques similar to those in lib/Object. This defines a
number of new records and enums useful for reading memory mapped codeview
sections in COFF objects.
The dumper is intended as a testing tool for LLVM as it grows more codeview
output capabilities.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D16104
llvm-svn: 257658
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp index 1e2f55b7115..a0292027d0d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp @@ -199,7 +199,6 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) { return; assert(FI.End && "Don't know where the function ends?"); - StringRef GVName = GV->getName(); StringRef FuncName; if (auto *SP = getDISubprogram(GV)) FuncName = SP->getDisplayName(); @@ -208,8 +207,8 @@ void WinCodeViewLineTables::emitDebugInfoForFunction(const Function *GV) { // "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); + 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(); |