|
2 | 2 | ; * test value representation for each possible underlying integer type
|
3 | 3 | ; * test the integer type is as expected
|
4 | 4 | ; * test the DW_AT_enum_class attribute is present (resp. absent) as expected.
|
| 5 | +; * test that DW_AT_type is present for v3 and greater, and v2 when strict DWARF |
| 6 | +; is not enabled. |
5 | 7 |
|
6 | 8 | ; RUN: llc -debugger-tune=gdb -dwarf-version=4 -filetype=obj -o %t.o < %s
|
7 |
| -; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-DW4 |
| 9 | +; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefixes=CHECK,CHECK-DW4,CHECK-TYPE |
| 10 | +; RUN: llc -debugger-tune=gdb -dwarf-version=3 -filetype=obj -o %t.o < %s |
| 11 | +; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefixes=CHECK,CHECK-TYPE |
8 | 12 | ; RUN: llc -debugger-tune=gdb -dwarf-version=2 -filetype=obj -o %t.o < %s
|
9 |
| -; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-DW2 |
| 13 | +; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefixes=CHECK,CHECK-TYPE |
| 14 | +; RUN: llc -debugger-tune=gdb -dwarf-version=2 -strict-dwarf=true -filetype=obj -o %t.o < %s |
| 15 | +; RUN: llvm-dwarfdump -debug-info %t.o | FileCheck %s --check-prefixes=CHECK,CHECK-DW2-STRICT |
10 | 16 |
|
11 | 17 | @x0 = global i8 0, align 1, !dbg !0
|
12 | 18 | @x1 = global i8 0, align 1, !dbg !46
|
|
34 | 40 | !8 = !DIEnumerator(name: "A0", value: -128)
|
35 | 41 | !9 = !DIEnumerator(name: "B0", value: 127)
|
36 | 42 | ; CHECK: DW_TAG_enumeration_type
|
37 |
| -; CHECK-DW2-NOT: DW_AT_type |
38 |
| -; CHECK-DW4: DW_AT_type{{.*}}"signed char" |
| 43 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 44 | +; CHECK-TYPE: DW_AT_type{{.*}}"signed char" |
39 | 45 | ; CHECK-DW4: DW_AT_enum_class (true)
|
40 | 46 | ; CHECK: DW_AT_name ("E0")
|
41 | 47 | ; CHECK: DW_TAG_enumerator
|
|
51 | 57 | !12 = !{!13}
|
52 | 58 | !13 = !DIEnumerator(name: "A1", value: 255, isUnsigned: true)
|
53 | 59 | ; CHECK: DW_TAG_enumeration_type
|
54 |
| -; CHECK-DW2-NOT: DW_AT_type |
55 |
| -; CHECK-DW4: DW_AT_type{{.*}}"unsigned char" |
| 60 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 61 | +; CHECK-TYPE: DW_AT_type{{.*}}"unsigned char" |
56 | 62 | ; CHECK-DW4: DW_AT_enum_class (true)
|
57 | 63 | ; CHECK: DW_AT_name ("E1")
|
58 | 64 | ; CHECK: DW_TAG_enumerator
|
|
66 | 72 | !17 = !DIEnumerator(name: "A2", value: -32768)
|
67 | 73 | !18 = !DIEnumerator(name: "B2", value: 32767)
|
68 | 74 | ; CHECK: DW_TAG_enumeration_type
|
69 |
| -; CHECK-DW2-NOT: DW_AT_type |
70 |
| -; CHECK-DW4: DW_AT_type{{.*}} "short" |
| 75 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 76 | +; CHECK-TYPE: DW_AT_type{{.*}} "short" |
71 | 77 | ; CHECK-DW4: DW_AT_enum_class (true)
|
72 | 78 | ; CHECK: DW_AT_name ("E2")
|
73 | 79 | ; CHECK: DW_TAG_enumerator
|
|
83 | 89 | !21 = !{!22}
|
84 | 90 | !22 = !DIEnumerator(name: "A3", value: 65535, isUnsigned: true)
|
85 | 91 | ; CHECK: DW_TAG_enumeration_type
|
86 |
| -; CHECK-DW2-NOT: DW_AT_type |
87 |
| -; CHECK-DW4: DW_AT_type{{.*}}"unsigned short" |
| 92 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 93 | +; CHECK-TYPE DW_AT_type{{.*}}"unsigned short" |
88 | 94 | ; CHECK-DW4: DW_AT_enum_class (true)
|
89 | 95 | ; CHECK: DW_AT_name ("E3")
|
90 | 96 | ; CHECK: DW_TAG_enumerator
|
|
98 | 104 | !26 = !DIEnumerator(name: "A4", value: -2147483648)
|
99 | 105 | !27 = !DIEnumerator(name: "B4", value: 2147483647)
|
100 | 106 | ; CHECK: DW_TAG_enumeration_type
|
101 |
| -; CHECK-DW2-NOT: DW_AT_type |
102 |
| -; CHECK-DW4: DW_AT_type{{.*}}"int" |
| 107 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 108 | +; CHECK-TYPE: DW_AT_type{{.*}}"int" |
103 | 109 | ; CHECK-DW4: DW_AT_enum_class (true)
|
104 | 110 | ; CHECK: DW_AT_name ("E4")
|
105 | 111 | ; CHECK: DW_TAG_enumerator
|
|
115 | 121 | !30 = !{!31}
|
116 | 122 | !31 = !DIEnumerator(name: "A5", value: 4294967295, isUnsigned: true)
|
117 | 123 | ; CHECK: DW_TAG_enumeration_type
|
118 |
| -; CHECK-DW2-NOT: DW_AT_type |
119 |
| -; CHECK-DW4: DW_AT_type{{.*}}"unsigned int" |
| 124 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 125 | +; CHECK-TYPE: DW_AT_type{{.*}}"unsigned int" |
120 | 126 | ; CHECK-DW4: DW_AT_enum_class (true)
|
121 | 127 | ; CHECK: DW_AT_name ("E5")
|
122 | 128 | ; CHECK: DW_TAG_enumerator
|
|
130 | 136 | !35 = !DIEnumerator(name: "A6", value: -9223372036854775808)
|
131 | 137 | !36 = !DIEnumerator(name: "B6", value: 9223372036854775807)
|
132 | 138 | ; CHECK: DW_TAG_enumeration_type
|
133 |
| -; CHECK-DW2-NOT: DW_AT_type |
134 |
| -; CHECK-DW4: DW_AT_type{{.*}}"long long int" |
| 139 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 140 | +; CHECK-TYPE: DW_AT_type{{.*}}"long long int" |
135 | 141 | ; CHECK-DW4: DW_AT_enum_class (true)
|
136 | 142 | ; CHECK: DW_AT_name ("E6")
|
137 | 143 | ; CHECK: DW_TAG_enumerator
|
|
147 | 153 | !39 = !{!40}
|
148 | 154 | !40 = !DIEnumerator(name: "A7", value: 18446744073709551615, isUnsigned: true)
|
149 | 155 | ; CHECK: DW_TAG_enumeration_type
|
150 |
| -; CHECK-DW2-NOT: DW_AT_type |
151 |
| -; CHECK-DW4: DW_AT_type{{.*}}"long long unsigned int" |
| 156 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 157 | +; CHECK-TYPE: DW_AT_type{{.*}}"long long unsigned int" |
152 | 158 | ; CHECK-DW4: DW_AT_enum_class (true)
|
153 | 159 | ; CHECK: DW_AT_name ("E7")
|
154 | 160 | ; CHECK: DW_TAG_enumerator
|
|
163 | 169 | !43 = !DIEnumerator(name: "A8", value: -128)
|
164 | 170 | !44 = !DIEnumerator(name: "B8", value: 127)
|
165 | 171 | ; CHECK: DW_TAG_enumeration_type
|
166 |
| -; CHECK-DW2-NOT: DW_AT_type |
167 |
| -; CHECK-DW4: DW_AT_type{{.*}}"int" |
| 172 | +; CHECK-DW2-STRICT-NOT: DW_AT_type |
| 173 | +; CHECK-TYPE: DW_AT_type{{.*}}"int" |
168 | 174 | ; CHECK-NOT: DW_AT_enum_class
|
169 | 175 | ; CHECK: DW_AT_name ("E8")
|
170 | 176 |
|
|
0 commit comments