1 ; REQUIRES: object-emission
2 ; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -all -show-form -v - \
5 ; Generated from the following source with clang -S -emit-llvm -gdwarf-5.
14 ; This test verifies that we generate DW_FORM_strx2 for indexed strings properly.
15 ; Check that the first usage of DW_FORM_strx2 is with index 256.
17 ; CHECK: .debug_info contents:
18 ; CHECK-NOT: DW_FORM_strx2
19 ; CHECK: DW_AT_name [DW_FORM_strx2] (indexed (00000100) string =
21 ; ModuleID = 'enum.cpp'
22 source_filename = "enum.cpp"
24 @glob = global i32 0, align 4, !dbg !0
27 !llvm.module.flags = !{!260, !261, !262}
30 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
31 !1 = distinct !DIGlobalVariable(name: "glob", scope: !2, file: !3, line: 255, type: !5, isLocal: false, isDefinition: true)
32 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 7.0.0 (trunk 322415)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !259)
33 !3 = !DIFile(filename: "enum.cpp", directory: "/home/test", checksumkind: CSK_MD5, checksum: "8965080a8027790e641e30c7762c53a0")
35 !5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", file: !3, line: 1, size: 32, elements: !6, identifier: "_ZTS1E")
36 !6 = !{!7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41, !42, !43, !44, !45, !46, !47, !48, !49, !50, !51, !52, !53, !54, !55, !56, !57, !58, !59, !60, !61, !62, !63, !64, !65, !66, !67, !68, !69, !70, !71, !72, !73, !74, !75, !76, !77, !78, !79, !80, !81, !82, !83, !84, !85, !86, !87, !88, !89, !90, !91, !92, !93, !94, !95, !96, !97, !98, !99, !100, !101, !102, !103, !104, !105, !106, !107, !108, !109, !110, !111, !112, !113, !114, !115, !116, !117, !118, !119, !120, !121, !122, !123, !124, !125, !126, !127, !128, !129, !130, !131, !132, !133, !134, !135, !136, !137, !138, !139, !140, !141, !142, !143, !144, !145, !146, !147, !148, !149, !150, !151, !152, !153, !154, !155, !156, !157, !158, !159, !160, !161, !162, !163, !164, !165, !166, !167, !168, !169, !170, !171, !172, !173, !174, !175, !176, !177, !178, !179, !180, !181, !182, !183, !184, !185, !186, !187, !188, !189, !190, !191, !192, !193, !194, !195, !196, !197, !198, !199, !200, !201, !202, !203, !204, !205, !206, !207, !208, !209, !210, !211, !212, !213, !214, !215, !216, !217, !218, !219, !220, !221, !222, !223, !224, !225, !226, !227, !228, !229, !230, !231, !232, !233, !234, !235, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253, !254, !255, !256, !257, !258}
37 !7 = !DIEnumerator(name: "econst1", value: 0)
38 !8 = !DIEnumerator(name: "econst2", value: 1)
39 !9 = !DIEnumerator(name: "econst3", value: 2)
40 !10 = !DIEnumerator(name: "econst4", value: 3)
41 !11 = !DIEnumerator(name: "econst5", value: 4)
42 !12 = !DIEnumerator(name: "econst6", value: 5)
43 !13 = !DIEnumerator(name: "econst7", value: 6)
44 !14 = !DIEnumerator(name: "econst8", value: 7)
45 !15 = !DIEnumerator(name: "econst9", value: 8)
46 !16 = !DIEnumerator(name: "econst10", value: 9)
47 !17 = !DIEnumerator(name: "econst11", value: 10)
48 !18 = !DIEnumerator(name: "econst12", value: 11)
49 !19 = !DIEnumerator(name: "econst13", value: 12)
50 !20 = !DIEnumerator(name: "econst14", value: 13)
51 !21 = !DIEnumerator(name: "econst15", value: 14)
52 !22 = !DIEnumerator(name: "econst16", value: 15)
53 !23 = !DIEnumerator(name: "econst17", value: 16)
54 !24 = !DIEnumerator(name: "econst18", value: 17)
55 !25 = !DIEnumerator(name: "econst19", value: 18)
56 !26 = !DIEnumerator(name: "econst20", value: 19)
57 !27 = !DIEnumerator(name: "econst21", value: 20)
58 !28 = !DIEnumerator(name: "econst22", value: 21)
59 !29 = !DIEnumerator(name: "econst23", value: 22)
60 !30 = !DIEnumerator(name: "econst24", value: 23)
61 !31 = !DIEnumerator(name: "econst25", value: 24)
62 !32 = !DIEnumerator(name: "econst26", value: 25)
63 !33 = !DIEnumerator(name: "econst27", value: 26)
64 !34 = !DIEnumerator(name: "econst28", value: 27)
65 !35 = !DIEnumerator(name: "econst29", value: 28)
66 !36 = !DIEnumerator(name: "econst30", value: 29)
67 !37 = !DIEnumerator(name: "econst31", value: 30)
68 !38 = !DIEnumerator(name: "econst32", value: 31)
69 !39 = !DIEnumerator(name: "econst33", value: 32)
70 !40 = !DIEnumerator(name: "econst34", value: 33)
71 !41 = !DIEnumerator(name: "econst35", value: 34)
72 !42 = !DIEnumerator(name: "econst36", value: 35)
73 !43 = !DIEnumerator(name: "econst37", value: 36)
74 !44 = !DIEnumerator(name: "econst38", value: 37)
75 !45 = !DIEnumerator(name: "econst39", value: 38)
76 !46 = !DIEnumerator(name: "econst40", value: 39)
77 !47 = !DIEnumerator(name: "econst41", value: 40)
78 !48 = !DIEnumerator(name: "econst42", value: 41)
79 !49 = !DIEnumerator(name: "econst43", value: 42)
80 !50 = !DIEnumerator(name: "econst44", value: 43)
81 !51 = !DIEnumerator(name: "econst45", value: 44)
82 !52 = !DIEnumerator(name: "econst46", value: 45)
83 !53 = !DIEnumerator(name: "econst47", value: 46)
84 !54 = !DIEnumerator(name: "econst48", value: 47)
85 !55 = !DIEnumerator(name: "econst49", value: 48)
86 !56 = !DIEnumerator(name: "econst50", value: 49)
87 !57 = !DIEnumerator(name: "econst51", value: 50)
88 !58 = !DIEnumerator(name: "econst52", value: 51)
89 !59 = !DIEnumerator(name: "econst53", value: 52)
90 !60 = !DIEnumerator(name: "econst54", value: 53)
91 !61 = !DIEnumerator(name: "econst55", value: 54)
92 !62 = !DIEnumerator(name: "econst56", value: 55)
93 !63 = !DIEnumerator(name: "econst57", value: 56)
94 !64 = !DIEnumerator(name: "econst58", value: 57)
95 !65 = !DIEnumerator(name: "econst59", value: 58)
96 !66 = !DIEnumerator(name: "econst60", value: 59)
97 !67 = !DIEnumerator(name: "econst61", value: 60)
98 !68 = !DIEnumerator(name: "econst62", value: 61)
99 !69 = !DIEnumerator(name: "econst63", value: 62)
100 !70 = !DIEnumerator(name: "econst64", value: 63)
101 !71 = !DIEnumerator(name: "econst65", value: 64)
102 !72 = !DIEnumerator(name: "econst66", value: 65)
103 !73 = !DIEnumerator(name: "econst67", value: 66)
104 !74 = !DIEnumerator(name: "econst68", value: 67)
105 !75 = !DIEnumerator(name: "econst69", value: 68)
106 !76 = !DIEnumerator(name: "econst70", value: 69)
107 !77 = !DIEnumerator(name: "econst71", value: 70)
108 !78 = !DIEnumerator(name: "econst72", value: 71)
109 !79 = !DIEnumerator(name: "econst73", value: 72)
110 !80 = !DIEnumerator(name: "econst74", value: 73)
111 !81 = !DIEnumerator(name: "econst75", value: 74)
112 !82 = !DIEnumerator(name: "econst76", value: 75)
113 !83 = !DIEnumerator(name: "econst77", value: 76)
114 !84 = !DIEnumerator(name: "econst78", value: 77)
115 !85 = !DIEnumerator(name: "econst79", value: 78)
116 !86 = !DIEnumerator(name: "econst80", value: 79)
117 !87 = !DIEnumerator(name: "econst81", value: 80)
118 !88 = !DIEnumerator(name: "econst82", value: 81)
119 !89 = !DIEnumerator(name: "econst83", value: 82)
120 !90 = !DIEnumerator(name: "econst84", value: 83)
121 !91 = !DIEnumerator(name: "econst85", value: 84)
122 !92 = !DIEnumerator(name: "econst86", value: 85)
123 !93 = !DIEnumerator(name: "econst87", value: 86)
124 !94 = !DIEnumerator(name: "econst88", value: 87)
125 !95 = !DIEnumerator(name: "econst89", value: 88)
126 !96 = !DIEnumerator(name: "econst90", value: 89)
127 !97 = !DIEnumerator(name: "econst91", value: 90)
128 !98 = !DIEnumerator(name: "econst92", value: 91)
129 !99 = !DIEnumerator(name: "econst93", value: 92)
130 !100 = !DIEnumerator(name: "econst94", value: 93)
131 !101 = !DIEnumerator(name: "econst95", value: 94)
132 !102 = !DIEnumerator(name: "econst96", value: 95)
133 !103 = !DIEnumerator(name: "econst97", value: 96)
134 !104 = !DIEnumerator(name: "econst98", value: 97)
135 !105 = !DIEnumerator(name: "econst99", value: 98)
136 !106 = !DIEnumerator(name: "econst100", value: 99)
137 !107 = !DIEnumerator(name: "econst101", value: 100)
138 !108 = !DIEnumerator(name: "econst102", value: 101)
139 !109 = !DIEnumerator(name: "econst103", value: 102)
140 !110 = !DIEnumerator(name: "econst104", value: 103)
141 !111 = !DIEnumerator(name: "econst105", value: 104)
142 !112 = !DIEnumerator(name: "econst106", value: 105)
143 !113 = !DIEnumerator(name: "econst107", value: 106)
144 !114 = !DIEnumerator(name: "econst108", value: 107)
145 !115 = !DIEnumerator(name: "econst109", value: 108)
146 !116 = !DIEnumerator(name: "econst110", value: 109)
147 !117 = !DIEnumerator(name: "econst111", value: 110)
148 !118 = !DIEnumerator(name: "econst112", value: 111)
149 !119 = !DIEnumerator(name: "econst113", value: 112)
150 !120 = !DIEnumerator(name: "econst114", value: 113)
151 !121 = !DIEnumerator(name: "econst115", value: 114)
152 !122 = !DIEnumerator(name: "econst116", value: 115)
153 !123 = !DIEnumerator(name: "econst117", value: 116)
154 !124 = !DIEnumerator(name: "econst118", value: 117)
155 !125 = !DIEnumerator(name: "econst119", value: 118)
156 !126 = !DIEnumerator(name: "econst120", value: 119)
157 !127 = !DIEnumerator(name: "econst121", value: 120)
158 !128 = !DIEnumerator(name: "econst122", value: 121)
159 !129 = !DIEnumerator(name: "econst123", value: 122)
160 !130 = !DIEnumerator(name: "econst124", value: 123)
161 !131 = !DIEnumerator(name: "econst125", value: 124)
162 !132 = !DIEnumerator(name: "econst126", value: 125)
163 !133 = !DIEnumerator(name: "econst127", value: 126)
164 !134 = !DIEnumerator(name: "econst128", value: 127)
165 !135 = !DIEnumerator(name: "econst129", value: 128)
166 !136 = !DIEnumerator(name: "econst130", value: 129)
167 !137 = !DIEnumerator(name: "econst131", value: 130)
168 !138 = !DIEnumerator(name: "econst132", value: 131)
169 !139 = !DIEnumerator(name: "econst133", value: 132)
170 !140 = !DIEnumerator(name: "econst134", value: 133)
171 !141 = !DIEnumerator(name: "econst135", value: 134)
172 !142 = !DIEnumerator(name: "econst136", value: 135)
173 !143 = !DIEnumerator(name: "econst137", value: 136)
174 !144 = !DIEnumerator(name: "econst138", value: 137)
175 !145 = !DIEnumerator(name: "econst139", value: 138)
176 !146 = !DIEnumerator(name: "econst140", value: 139)
177 !147 = !DIEnumerator(name: "econst141", value: 140)
178 !148 = !DIEnumerator(name: "econst142", value: 141)
179 !149 = !DIEnumerator(name: "econst143", value: 142)
180 !150 = !DIEnumerator(name: "econst144", value: 143)
181 !151 = !DIEnumerator(name: "econst145", value: 144)
182 !152 = !DIEnumerator(name: "econst146", value: 145)
183 !153 = !DIEnumerator(name: "econst147", value: 146)
184 !154 = !DIEnumerator(name: "econst148", value: 147)
185 !155 = !DIEnumerator(name: "econst149", value: 148)
186 !156 = !DIEnumerator(name: "econst150", value: 149)
187 !157 = !DIEnumerator(name: "econst151", value: 150)
188 !158 = !DIEnumerator(name: "econst152", value: 151)
189 !159 = !DIEnumerator(name: "econst153", value: 152)
190 !160 = !DIEnumerator(name: "econst154", value: 153)
191 !161 = !DIEnumerator(name: "econst155", value: 154)
192 !162 = !DIEnumerator(name: "econst156", value: 155)
193 !163 = !DIEnumerator(name: "econst157", value: 156)
194 !164 = !DIEnumerator(name: "econst158", value: 157)
195 !165 = !DIEnumerator(name: "econst159", value: 158)
196 !166 = !DIEnumerator(name: "econst160", value: 159)
197 !167 = !DIEnumerator(name: "econst161", value: 160)
198 !168 = !DIEnumerator(name: "econst162", value: 161)
199 !169 = !DIEnumerator(name: "econst163", value: 162)
200 !170 = !DIEnumerator(name: "econst164", value: 163)
201 !171 = !DIEnumerator(name: "econst165", value: 164)
202 !172 = !DIEnumerator(name: "econst166", value: 165)
203 !173 = !DIEnumerator(name: "econst167", value: 166)
204 !174 = !DIEnumerator(name: "econst168", value: 167)
205 !175 = !DIEnumerator(name: "econst169", value: 168)
206 !176 = !DIEnumerator(name: "econst170", value: 169)
207 !177 = !DIEnumerator(name: "econst171", value: 170)
208 !178 = !DIEnumerator(name: "econst172", value: 171)
209 !179 = !DIEnumerator(name: "econst173", value: 172)
210 !180 = !DIEnumerator(name: "econst174", value: 173)
211 !181 = !DIEnumerator(name: "econst175", value: 174)
212 !182 = !DIEnumerator(name: "econst176", value: 175)
213 !183 = !DIEnumerator(name: "econst177", value: 176)
214 !184 = !DIEnumerator(name: "econst178", value: 177)
215 !185 = !DIEnumerator(name: "econst179", value: 178)
216 !186 = !DIEnumerator(name: "econst180", value: 179)
217 !187 = !DIEnumerator(name: "econst181", value: 180)
218 !188 = !DIEnumerator(name: "econst182", value: 181)
219 !189 = !DIEnumerator(name: "econst183", value: 182)
220 !190 = !DIEnumerator(name: "econst184", value: 183)
221 !191 = !DIEnumerator(name: "econst185", value: 184)
222 !192 = !DIEnumerator(name: "econst186", value: 185)
223 !193 = !DIEnumerator(name: "econst187", value: 186)
224 !194 = !DIEnumerator(name: "econst188", value: 187)
225 !195 = !DIEnumerator(name: "econst189", value: 188)
226 !196 = !DIEnumerator(name: "econst190", value: 189)
227 !197 = !DIEnumerator(name: "econst191", value: 190)
228 !198 = !DIEnumerator(name: "econst192", value: 191)
229 !199 = !DIEnumerator(name: "econst193", value: 192)
230 !200 = !DIEnumerator(name: "econst194", value: 193)
231 !201 = !DIEnumerator(name: "econst195", value: 194)
232 !202 = !DIEnumerator(name: "econst196", value: 195)
233 !203 = !DIEnumerator(name: "econst197", value: 196)
234 !204 = !DIEnumerator(name: "econst198", value: 197)
235 !205 = !DIEnumerator(name: "econst199", value: 198)
236 !206 = !DIEnumerator(name: "econst200", value: 199)
237 !207 = !DIEnumerator(name: "econst201", value: 200)
238 !208 = !DIEnumerator(name: "econst202", value: 201)
239 !209 = !DIEnumerator(name: "econst203", value: 202)
240 !210 = !DIEnumerator(name: "econst204", value: 203)
241 !211 = !DIEnumerator(name: "econst205", value: 204)
242 !212 = !DIEnumerator(name: "econst206", value: 205)
243 !213 = !DIEnumerator(name: "econst207", value: 206)
244 !214 = !DIEnumerator(name: "econst208", value: 207)
245 !215 = !DIEnumerator(name: "econst209", value: 208)
246 !216 = !DIEnumerator(name: "econst210", value: 209)
247 !217 = !DIEnumerator(name: "econst211", value: 210)
248 !218 = !DIEnumerator(name: "econst212", value: 211)
249 !219 = !DIEnumerator(name: "econst213", value: 212)
250 !220 = !DIEnumerator(name: "econst214", value: 213)
251 !221 = !DIEnumerator(name: "econst215", value: 214)
252 !222 = !DIEnumerator(name: "econst216", value: 215)
253 !223 = !DIEnumerator(name: "econst217", value: 216)
254 !224 = !DIEnumerator(name: "econst218", value: 217)
255 !225 = !DIEnumerator(name: "econst219", value: 218)
256 !226 = !DIEnumerator(name: "econst220", value: 219)
257 !227 = !DIEnumerator(name: "econst221", value: 220)
258 !228 = !DIEnumerator(name: "econst222", value: 221)
259 !229 = !DIEnumerator(name: "econst223", value: 222)
260 !230 = !DIEnumerator(name: "econst224", value: 223)
261 !231 = !DIEnumerator(name: "econst225", value: 224)
262 !232 = !DIEnumerator(name: "econst226", value: 225)
263 !233 = !DIEnumerator(name: "econst227", value: 226)
264 !234 = !DIEnumerator(name: "econst228", value: 227)
265 !235 = !DIEnumerator(name: "econst229", value: 228)
266 !236 = !DIEnumerator(name: "econst230", value: 229)
267 !237 = !DIEnumerator(name: "econst231", value: 230)
268 !238 = !DIEnumerator(name: "econst232", value: 231)
269 !239 = !DIEnumerator(name: "econst233", value: 232)
270 !240 = !DIEnumerator(name: "econst234", value: 233)
271 !241 = !DIEnumerator(name: "econst235", value: 234)
272 !242 = !DIEnumerator(name: "econst236", value: 235)
273 !243 = !DIEnumerator(name: "econst237", value: 236)
274 !244 = !DIEnumerator(name: "econst238", value: 237)
275 !245 = !DIEnumerator(name: "econst239", value: 238)
276 !246 = !DIEnumerator(name: "econst240", value: 239)
277 !247 = !DIEnumerator(name: "econst241", value: 240)
278 !248 = !DIEnumerator(name: "econst242", value: 241)
279 !249 = !DIEnumerator(name: "econst243", value: 242)
280 !250 = !DIEnumerator(name: "econst244", value: 243)
281 !251 = !DIEnumerator(name: "econst245", value: 244)
282 !252 = !DIEnumerator(name: "econst246", value: 245)
283 !253 = !DIEnumerator(name: "econst247", value: 246)
284 !254 = !DIEnumerator(name: "econst248", value: 247)
285 !255 = !DIEnumerator(name: "econst249", value: 248)
286 !256 = !DIEnumerator(name: "econst250", value: 249)
287 !257 = !DIEnumerator(name: "econst251", value: 250)
288 !258 = !DIEnumerator(name: "econst252", value: 251)
290 !260 = !{i32 2, !"Dwarf Version", i32 5}
291 !261 = !{i32 2, !"Debug Info Version", i32 3}
292 !262 = !{i32 1, !"wchar_size", i32 4}
293 !263 = !{!"clang version 7.0.0 (trunk 322415)"}