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 | 5e6b65cf0d75f75e4b6ab2397ee40f388685e186 (patch) | |
tree | cbaab00c70d3e7f4c61b778b4b8036e561a2e924 /llvm/lib/CodeGen | |
parent | ef65f002dfc17d248784a16c2e97f4224b4be5f0 (diff) | |
download | bcm5719-llvm-5e6b65cf0d75f75e4b6ab2397ee40f388685e186.tar.gz bcm5719-llvm-5e6b65cf0d75f75e4b6ab2397ee40f388685e186.zip |
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.
llvm-svn: 140282
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 33a065d5843..1e1ddca21c8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/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); |