57 lines · plain
1; RUN: llc < %s -filetype=obj -o %t2; RUN: llvm-dwarfdump -v %t | FileCheck %s3 4; C++ source to regenerate:5; enum __attribute__((enum_extensibility(open))) OpenEnum {6; oe17; } oe;8; 9; enum __attribute__((enum_extensibility(closed))) ClosedEnum {10; ce111; } ce;12; 13; $ clang++ -O0 -g debug-info-enum-kind.cpp -c14 15 16; CHECK: .debug_abbrev contents:17 18; CHECK: [3] DW_TAG_enumeration_type DW_CHILDREN_yes19; CHECK: DW_AT_APPLE_enum_kind DW_FORM_data120 21; CHECK: .debug_info contents:22 23; CHECK: DW_TAG_enumeration_type [3]24; CHECK-DAG: DW_AT_name {{.*}} string = "OpenEnum"25; CHECK-DAG: DW_AT_APPLE_enum_kind [DW_FORM_data1] (DW_APPLE_ENUM_KIND_Open)26 27; CHECK: DW_TAG_enumeration_type [3]28; CHECK-DAG: DW_AT_name {{.*}} string = "ClosedEnum"29; CHECK-DAG: DW_AT_APPLE_enum_kind [DW_FORM_data1] (DW_APPLE_ENUM_KIND_Closed)30 31source_filename = "enum.cpp"32target triple = "arm64-apple-macosx"33 34@oe = global i32 0, align 4, !dbg !035@ce = global i32 0, align 4, !dbg !1336 37!llvm.dbg.cu = !{!2}38!llvm.module.flags = !{!15, !16}39 40!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())41!1 = distinct !DIGlobalVariable(name: "oe", scope: !2, file: !3, line: 3, type: !5, isLocal: false, isDefinition: true)42!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 21.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !12, splitDebugInlining: false, nameTableKind: Apple, sysroot: "/")43!3 = !DIFile(filename: "enum.cpp", directory: "/tmp")44!4 = !{!5, !9}45!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "OpenEnum", file: !3, line: 1, baseType: !6, size: 32, elements: !7, identifier: "_ZTS8OpenEnum", enumKind: DW_APPLE_ENUM_KIND_Open)46!6 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)47!7 = !{!8}48!8 = !DIEnumerator(name: "oe1", value: 0, isUnsigned: true)49!9 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "ClosedEnum", file: !3, line: 5, baseType: !6, size: 32, elements: !10, identifier: "_ZTS10ClosedEnum", enumKind: DW_APPLE_ENUM_KIND_Closed)50!10 = !{!11}51!11 = !DIEnumerator(name: "ce1", value: 0, isUnsigned: true)52!12 = !{!0, !13}53!13 = !DIGlobalVariableExpression(var: !14, expr: !DIExpression())54!14 = distinct !DIGlobalVariable(name: "ce", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true)55!15 = !{i32 7, !"Dwarf Version", i32 5}56!16 = !{i32 2, !"Debug Info Version", i32 3}57