[llvm] r218060 - Revert part of r218041.
Frederic Riss
friss at apple.com
Thu Sep 18 09:41:04 PDT 2014
Author: friss
Date: Thu Sep 18 11:41:04 2014
New Revision: 218060
URL: http://llvm.org/viewvc/llvm-project?rev=218060&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=218060&r1=218059&r2=218060&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Thu Sep 18 11:41:04 2014
@@ -1681,6 +1681,9 @@ void DwarfCompileUnit::createGlobalVaria
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);
}
More information about the llvm-commits
mailing list