Use addFlag to add the enum class attribute.

This has the side effect of using DW_FORM_flag_present on dwarf4 and above.

llvm-svn: 191991
This commit is contained in:
Eric Christopher 2013-10-04 22:40:10 +00:00
parent dccd32866b
commit 6b8209b6b7
2 changed files with 3 additions and 3 deletions

View File

@ -1014,7 +1014,7 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
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;

View File

@ -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]