mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user