From: Devang Patel Date: Tue, 9 Feb 2010 01:58:33 +0000 (+0000) Subject: Add declaration attribute to a variable DIE, if there is a separate DIE for the defin... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8581e0147cd7622ecec96a47310fc1a211b77908;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 6c4f1cda2f1..0182027a138 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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();