Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 7458ce3

Browse files
committed
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
1 parent 335a2eb commit 7458ce3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/CodeGen/AsmPrinter/DwarfUnit.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,9 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
16811681
VariableSpecDIE = &createAndAddDIE(dwarf::DW_TAG_variable, UnitDie);
16821682
addDIEEntry(*VariableSpecDIE, dwarf::DW_AT_specification, *VariableDIE);
16831683
addBlock(*VariableSpecDIE, dwarf::DW_AT_location, Loc);
1684+
// A static member's declaration is already flagged as such.
1685+
if (!SDMDecl.Verify())
1686+
addFlag(*VariableDIE, dwarf::DW_AT_declaration);
16841687
} else {
16851688
addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
16861689
}

0 commit comments

Comments
 (0)