Skip to content

Commit c8d308b

Browse files
committed
fixup! move rountrip test to Bitcode directory
1 parent 404f3db commit c8d308b

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s --check-prefix=CHECK-METADATA
2+
3+
; C++ source to regenerate:
4+
; enum __attribute__((enum_extensibility(open))) OpenEnum {
5+
; oe1
6+
; } oe;
7+
;
8+
; enum __attribute__((enum_extensibility(closed))) ClosedEnum {
9+
; ce1
10+
; } ce;
11+
;
12+
; $ clang++ -O0 -g debug-info-enum-kind.cpp -c
13+
14+
; CHECK-METADATA: enumKind: DW_APPLE_ENUM_KIND_Open
15+
; CHECK-METADATA: enumKind: DW_APPLE_ENUM_KIND_Closed
16+
17+
source_filename = "enum.cpp"
18+
target triple = "arm64-apple-macosx"
19+
20+
@oe = global i32 0, align 4, !dbg !0
21+
@ce = global i32 0, align 4, !dbg !13
22+
23+
!llvm.dbg.cu = !{!2}
24+
!llvm.module.flags = !{!15, !16}
25+
26+
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
27+
!1 = distinct !DIGlobalVariable(name: "oe", scope: !2, file: !3, line: 3, type: !5, isLocal: false, isDefinition: true)
28+
!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: "/")
29+
!3 = !DIFile(filename: "enum.cpp", directory: "/tmp")
30+
!4 = !{!5, !9}
31+
!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)
32+
!6 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
33+
!7 = !{!8}
34+
!8 = !DIEnumerator(name: "oe1", value: 0, isUnsigned: true)
35+
!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)
36+
!10 = !{!11}
37+
!11 = !DIEnumerator(name: "ce1", value: 0, isUnsigned: true)
38+
!12 = !{!0, !13}
39+
!13 = !DIGlobalVariableExpression(var: !14, expr: !DIExpression())
40+
!14 = distinct !DIGlobalVariable(name: "ce", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true)
41+
!15 = !{i32 7, !"Dwarf Version", i32 5}
42+
!16 = !{i32 2, !"Debug Info Version", i32 3}

llvm/test/DebugInfo/AArch64/DW_AT_APPLE_enum_kind.ll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
; RUN: llc < %s -filetype=obj -o %t
22
; RUN: llvm-dwarfdump -v %t | FileCheck %s
33
;
4-
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s --check-prefix=CHECK-METADATA
5-
64
; C++ source to regenerate:
75
; enum __attribute__((enum_extensibility(open))) OpenEnum {
86
; oe1
@@ -14,9 +12,6 @@
1412
;
1513
; $ clang++ -O0 -g debug-info-enum-kind.cpp -c
1614

17-
; CHECK-METADATA: enumKind: DW_APPLE_ENUM_KIND_Open
18-
; CHECK-METADATA: enumKind: DW_APPLE_ENUM_KIND_Closed
19-
2015
; CHECK: .debug_abbrev contents:
2116

2217
; CHECK: [3] DW_TAG_enumeration_type DW_CHILDREN_yes

0 commit comments

Comments
 (0)