Add declaration attribute to a variable DIE, if there is a separate DIE for the definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-02-09 01:58:33 +00:00
parent 2d58147ca5
commit 8581e0147c

View File

@ -1720,6 +1720,7 @@ void DwarfDebug::constructGlobalVariableDIE(MDNode *N) {
addObjectLabel(Block, 0, dwarf::DW_FORM_udata,
Asm->GetGlobalValueSymbol(DI_GV.getGlobal()));
addBlock(VariableSpecDIE, dwarf::DW_AT_location, 0, Block);
addUInt(VariableDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1);
ModuleCU->addDie(VariableSpecDIE);
} else {
DIEBlock *Block = new DIEBlock();