diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-05-04 13:13:19 -0400 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-05-04 13:59:36 -0400 |
commit | 721ea5b380b8c8304d24e14b9164660604b93032 (patch) | |
tree | 087d3d628ed969e813c2cd134e045a448ba473c8 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 94361ddd93d5627fe321fa9956e8ef017a767ed6 (diff) | |
download | llvm-721ea5b380b8c8304d24e14b9164660604b93032.zip llvm-721ea5b380b8c8304d24e14b9164660604b93032.tar.gz llvm-721ea5b380b8c8304d24e14b9164660604b93032.tar.bz2 |
[DebugInfo][CodeView] Include namespace into emitted globals
Before this patch, global variables didn't have their namespace prepended in the Codeview debug symbol stream. This prevented Visual Studio from displaying them in the debugger (they appeared as 'unspecified error')
Differential Revision: https://reviews.llvm.org/D79028
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 3264e07..f167cea 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -3111,7 +3111,9 @@ void CodeViewDebug::emitDebugInfoForGlobal(const CVGlobalVariable &CVGV) { OS.EmitCOFFSectionIndex(GVSym); OS.AddComment("Name"); const unsigned LengthOfDataRecord = 12; - emitNullTerminatedSymbolName(OS, DIGV->getName(), LengthOfDataRecord); + emitNullTerminatedSymbolName( + OS, getFullyQualifiedName(DIGV->getScope(), DIGV->getName()), + LengthOfDataRecord); endSymbolRecord(DataEnd); } else { // FIXME: Currently this only emits the global variables in the IR metadata. |