[llvm-commits] [llvm] r170156 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp test/DebugInfo/X86/elf-names.ll
David Blaikie
dblaikie at gmail.com
Thu Dec 13 14:43:07 PST 2012
Author: dblaikie
Date: Thu Dec 13 16:43:07 2012
New Revision: 170156
URL: http://llvm.org/viewvc/llvm-project?rev=170156&view=rev
Log:
Debug Info: add support to mark member variables as artificial
This is the LLVM portion of r170154.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/test/DebugInfo/X86/elf-names.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=170156&r1=170155&r2=170156&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Dec 13 16:43:07 2012
@@ -1559,6 +1559,9 @@
MemberDie->addValue(dwarf::DW_AT_APPLE_property, dwarf::DW_FORM_ref4,
PropertyDie);
+ if (DT.isArtificial())
+ addFlag(MemberDie, dwarf::DW_AT_artificial);
+
// This is only for backward compatibility.
StringRef PropertyName = DT.getObjCPropertyName();
if (!PropertyName.empty()) {
Modified: llvm/trunk/test/DebugInfo/X86/elf-names.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/elf-names.ll?rev=170156&r1=170155&r2=170156&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/elf-names.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/elf-names.ll Thu Dec 13 16:43:07 2012
@@ -7,6 +7,7 @@
; CHECK: 0x0000003d: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006d] = "D")
; CHECK: 0x00000044: DW_TAG_member
; CHECK: 0x00000045: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005d] = "c1")
+; CHECK: 0x0000008d: DW_AT_artificial [DW_FORM_flag_present] (true)
%class.D = type { i32, i32, i32, i32 }
More information about the llvm-commits
mailing list