mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
DebugInfo: Pubnames: Do not include variable declarations in pubnames
This causes badness for GDB which expects to find a definition in any compile_unit that has an entry for the variable in its pubnames. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -137,6 +137,8 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
||||
|
||||
if (!GV->isDefinition())
|
||||
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
|
||||
else
|
||||
addGlobalName(GV->getName(), *VariableDIE, DeclContext);
|
||||
|
||||
// Add location.
|
||||
bool addToAccelTable = false;
|
||||
@ -202,7 +204,6 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
|
||||
DD->addAccelName(GV->getLinkageName(), *VariableDIE);
|
||||
}
|
||||
|
||||
addGlobalName(GV->getName(), *VariableDIE, DeclContext);
|
||||
return VariableDIE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user