Revert part of r218041.

The patch moved some logic around in an attempt to generate potentially more
DW_AT_declaration attributes. The patch was flawed though and it stopped
generating the attribute in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frederic Riss 2014-09-18 16:41:04 +00:00
parent 335a2eb248
commit 7458ce3af9

View File

@ -1681,6 +1681,9 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
VariableSpecDIE = &createAndAddDIE(dwarf::DW_TAG_variable, UnitDie);
addDIEEntry(*VariableSpecDIE, dwarf::DW_AT_specification, *VariableDIE);
addBlock(*VariableSpecDIE, dwarf::DW_AT_location, Loc);
// A static member's declaration is already flagged as such.
if (!SDMDecl.Verify())
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
} else {
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
}