[llvm] r191991 - Use addFlag to add the enum class attribute.
Eric Christopher
echristo at gmail.com
Fri Oct 4 15:40:10 PDT 2013
Author: echristo
Date: Fri Oct 4 17:40:10 2013
New Revision: 191991
URL: http://llvm.org/viewvc/llvm-project?rev=191991&view=rev
Log:
Use addFlag to add the enum class attribute.
This has the side effect of using DW_FORM_flag_present on dwarf4 and above.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/test/DebugInfo/X86/enum-class.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=191991&r1=191990&r2=191991&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Oct 4 17:40:10 2013
@@ -1014,7 +1014,7 @@ void CompileUnit::constructTypeDIE(DIE &
DIType DTy = CTy.getTypeDerivedFrom();
if (DTy) {
addType(&Buffer, DTy);
- addUInt(&Buffer, dwarf::DW_AT_enum_class, dwarf::DW_FORM_flag, 1);
+ addFlag(&Buffer, dwarf::DW_AT_enum_class);
}
}
break;
Modified: llvm/trunk/test/DebugInfo/X86/enum-class.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/enum-class.ll?rev=191991&r1=191990&r2=191991&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/enum-class.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/enum-class.ll Fri Oct 4 17:40:10 2013
@@ -30,12 +30,12 @@
; CHECK: DW_TAG_enumeration_type [3]
; CHECK: DW_AT_type [DW_FORM_ref4]
-; CHECK: DW_AT_enum_class [DW_FORM_flag] (0x01)
+; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "A")
; CHECK: DW_TAG_enumeration_type [3] *
; CHECK: DW_AT_type [DW_FORM_ref4]
-; CHECK: DW_AT_enum_class [DW_FORM_flag] (0x01)
+; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "B")
; CHECK: DW_TAG_enumeration_type [6]
More information about the llvm-commits
mailing list