diff options
author | Devang Patel <dpatel@apple.com> | 2011-09-21 23:41:11 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-09-21 23:41:11 +0000 |
commit | 1dd4e56d5565d59e9d40ad9e088a05e06f4b70f8 (patch) | |
tree | e91f78127a280101e7b563c5c5d082e7c12cdb62 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | ef01f32d07f4c7ecd9d116be53c5f3de3138f1ae (diff) |
Do not unnecessarily use AT_specification DIE because it does not add any value.
Few weeks ago, llvm completely inverted the debug info graph. Earlier each debug info node used to keep track of its compile unit, now compile unit keeps track of important nodes. One impact of this change is that the global variable's do not have any context, which should be checked before deciding to use AT_specification DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 33a065d584..1e1ddca21c 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1081,7 +1081,7 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) { Asm->Mang->getSymbol(GV.getGlobal())); // Do not create specification DIE if context is either compile unit // or a subprogram. - if (GV.isDefinition() && !GVContext.isCompileUnit() && + if (GVContext && GV.isDefinition() && !GVContext.isCompileUnit() && !GVContext.isFile() && !isSubprogramContext(GVContext)) { // Create specification DIE. DIE *VariableSpecDIE = new DIE(dwarf::DW_TAG_variable); |