llvm.org GIT mirror llvm / 4a76d17
Remove test to check bugfix in handing debug info for global variables using intrinsics. Now, debug info for global variable is encoded using metadata. The old code path is now history and there is no need to have a test to check a bug fix in old code path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97477 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 9 years ago
1 changed file(s) with 0 addition(s) and 264 deletion(s). Raw diff Collapse all Expand all
+0
-264
test/DebugInfo/globalGetElementPtr.ll less more
None ; RUN: llc < %s
1 ; ModuleID = 'foo.c'
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
3 target triple = "i686-apple-darwin8"
4 %llvm.dbg.anchor.type = type { i32, i32 }
5 %llvm.dbg.basictype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, i32 }
6 %llvm.dbg.compile_unit.type = type { i32, %struct.anon*, i32, i8*, i8*, i8* }
7 %llvm.dbg.compositetype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, %struct.anon*, %struct.anon* }
8 %llvm.dbg.derivedtype.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, i64, i64, i64, i32, %struct.anon* }
9 %llvm.dbg.global_variable.type = type { i32, %struct.anon*, %struct.anon*, i8*, i8*, i8*, %struct.anon*, i32, %struct.anon*, i1, i1, %struct.anon* }
10 %llvm.dbg.subprogram.type = type { i32, %struct.anon*, %struct.anon*, i8*, i8*, i8*, %struct.anon*, i32, %struct.anon*, i1, i1 }
11 %llvm.dbg.subrange.type = type { i32, i64, i64 }
12 %llvm.dbg.variable.type = type { i32, %struct.anon*, i8*, %struct.anon*, i32, %struct.anon* }
13 %struct.S271 = type { [0 x %struct.anon], %struct.anon }
14 %struct.anon = type { }
15 @llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type {
16 i32 393262,
17 %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %struct.anon*),
18 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
19 i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0),
20 i8* getelementptr ([4 x i8]* @.str3, i32 0, i32 0),
21 i8* null,
22 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
23 i32 2,
24 %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %struct.anon*),
25 i1 false,
26 i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1]
27 @llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
28 @llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type {
29 i32 393233,
30 %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to %struct.anon*),
31 i32 1,
32 i8* getelementptr ([6 x i8]* @.str, i32 0, i32 0),
33 i8* getelementptr ([23 x i8]* @.str1, i32 0, i32 0),
34 i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1]
35 @llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
36 @.str = internal constant [6 x i8] c"foo.c\00", section "llvm.metadata" ; <[6 x i8]*> [#uses=1]
37 @.str1 = internal constant [23 x i8] c"/Volumes/MacOS9/tests/\00", section "llvm.metadata" ; <[23 x i8]*> [#uses=1]
38 @.str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5546) (LLVM build)\00", section "llvm.metadata" ; <[52 x i8]*> [#uses=1]
39 @.str3 = internal constant [4 x i8] c"var\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1]
40 @llvm.dbg.derivedtype = internal constant %llvm.dbg.derivedtype.type {
41 i32 393231,
42 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
43 i8* null,
44 %struct.anon* null,
45 i32 0,
46 i64 32,
47 i64 32,
48 i64 0,
49 i32 0,
50 %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1]
51 @llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type {
52 i32 393252,
53 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
54 i8* getelementptr ([5 x i8]* @.str4, i32 0, i32 0),
55 %struct.anon* null,
56 i32 0,
57 i64 8,
58 i64 8,
59 i64 0,
60 i32 0,
61 i32 6 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1]
62 @.str4 = internal constant [5 x i8] c"char\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1]
63 @llvm.dbg.variable = internal constant %llvm.dbg.variable.type {
64 i32 393474,
65 %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*),
66 i8* getelementptr ([7 x i8]* @.str5, i32 0, i32 0),
67 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
68 i32 2,
69 %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1]
70 @.str5 = internal constant [7 x i8] c"retval\00", section "llvm.metadata" ; <[7 x i8]*> [#uses=1]
71 @a271 = weak global [0 x %struct.S271] zeroinitializer ; <[0 x %struct.S271]*> [#uses=3]
72 @llvm.dbg.subprogram6 = internal constant %llvm.dbg.subprogram.type {
73 i32 393262,
74 %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to %struct.anon*),
75 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
76 i8* getelementptr ([5 x i8]* @.str7, i32 0, i32 0),
77 i8* getelementptr ([5 x i8]* @.str7, i32 0, i32 0),
78 i8* null,
79 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
80 i32 3,
81 %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype8 to %struct.anon*),
82 i1 false,
83 i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1]
84 @.str7 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1]
85 @llvm.dbg.basictype8 = internal constant %llvm.dbg.basictype.type {
86 i32 393252,
87 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
88 i8* getelementptr ([4 x i8]* @.str9, i32 0, i32 0),
89 %struct.anon* null,
90 i32 0,
91 i64 32,
92 i64 32,
93 i64 0,
94 i32 0,
95 i32 5 }, section "llvm.metadata" ; <%llvm.dbg.basictype.type*> [#uses=1]
96 @.str9 = internal constant [4 x i8] c"int\00", section "llvm.metadata" ; <[4 x i8]*> [#uses=1]
97 @llvm.dbg.variable10 = internal constant %llvm.dbg.variable.type {
98 i32 393474,
99 %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*),
100 i8* getelementptr ([7 x i8]* @.str5, i32 0, i32 0),
101 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
102 i32 3,
103 %struct.anon* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype8 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.variable.type*> [#uses=1]
104 @llvm.dbg.global_variable = internal constant %llvm.dbg.global_variable.type {
105 i32 393268,
106 %struct.anon* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.global_variables to %struct.anon*),
107 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
108 i8* getelementptr ([5 x i8]* @.str11, i32 0, i32 0),
109 i8* getelementptr ([5 x i8]* @.str11, i32 0, i32 0),
110 i8* null,
111 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
112 i32 1,
113 %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype to %struct.anon*),
114 i1 false,
115 i1 true,
116 %struct.anon* getelementptr ([0 x %struct.S271]* @a271, i32 0, i32 0, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.global_variable.type*> [#uses=0]
117 @llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
118 @.str11 = internal constant [5 x i8] c"a271\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1]
119 @llvm.dbg.compositetype = internal constant %llvm.dbg.compositetype.type {
120 i32 393217,
121 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
122 i8* null,
123 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
124 i32 0,
125 i64 0,
126 i64 8,
127 i64 0,
128 i32 0,
129 %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype12 to %struct.anon*),
130 %struct.anon* bitcast ([1 x %struct.anon*]* @llvm.dbg.array25 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1]
131 @llvm.dbg.compositetype12 = internal constant %llvm.dbg.compositetype.type {
132 i32 393235,
133 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
134 i8* getelementptr ([5 x i8]* @.str13, i32 0, i32 0),
135 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
136 i32 1,
137 i64 0,
138 i64 8,
139 i64 0,
140 i32 0,
141 %struct.anon* null,
142 %struct.anon* bitcast ([2 x %struct.anon*]* @llvm.dbg.array23 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1]
143 @.str13 = internal constant [5 x i8] c"S271\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1]
144 @llvm.dbg.derivedtype14 = internal constant %llvm.dbg.derivedtype.type {
145 i32 393229,
146 %struct.anon* null,
147 i8* getelementptr ([2 x i8]* @.str15, i32 0, i32 0),
148 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
149 i32 1,
150 i64 0,
151 i64 8,
152 i64 0,
153 i32 0,
154 %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype16 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1]
155 @.str15 = internal constant [2 x i8] c"a\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1]
156 @llvm.dbg.compositetype16 = internal constant %llvm.dbg.compositetype.type {
157 i32 393217,
158 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
159 i8* null,
160 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
161 i32 0,
162 i64 0,
163 i64 8,
164 i64 0,
165 i32 0,
166 %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype17 to %struct.anon*),
167 %struct.anon* bitcast ([1 x %struct.anon*]* @llvm.dbg.array18 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1]
168 @llvm.dbg.compositetype17 = internal constant %llvm.dbg.compositetype.type {
169 i32 393235,
170 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
171 i8* null,
172 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
173 i32 1,
174 i64 0,
175 i64 8,
176 i64 0,
177 i32 0,
178 %struct.anon* null,
179 %struct.anon* bitcast ([0 x %struct.anon*]* @llvm.dbg.array to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1]
180 @llvm.dbg.array = internal constant [0 x %struct.anon*] zeroinitializer, section "llvm.metadata" ; <[0 x %struct.anon*]*> [#uses=1]
181 @llvm.dbg.subrange = internal constant %llvm.dbg.subrange.type {
182 i32 393249,
183 i64 0,
184 i64 4 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1]
185 @llvm.dbg.array18 = internal constant [1 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange to %struct.anon*) ], section "llvm.metadata" ; <[1 x %struct.anon*]*> [#uses=1]
186 @llvm.dbg.derivedtype19 = internal constant %llvm.dbg.derivedtype.type {
187 i32 393229,
188 %struct.anon* null,
189 i8* getelementptr ([2 x i8]* @.str20, i32 0, i32 0),
190 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
191 i32 1,
192 i64 0,
193 i64 8,
194 i64 0,
195 i32 0,
196 %struct.anon* bitcast (%llvm.dbg.compositetype.type* @llvm.dbg.compositetype21 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.derivedtype.type*> [#uses=1]
197 @.str20 = internal constant [2 x i8] c"b\00", section "llvm.metadata" ; <[2 x i8]*> [#uses=1]
198 @llvm.dbg.compositetype21 = internal constant %llvm.dbg.compositetype.type {
199 i32 393235,
200 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
201 i8* null,
202 %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*),
203 i32 1,
204 i64 0,
205 i64 8,
206 i64 0,
207 i32 0,
208 %struct.anon* null,
209 %struct.anon* bitcast ([0 x %struct.anon*]* @llvm.dbg.array22 to %struct.anon*) }, section "llvm.metadata" ; <%llvm.dbg.compositetype.type*> [#uses=1]
210 @llvm.dbg.array22 = internal constant [0 x %struct.anon*] zeroinitializer, section "llvm.metadata" ; <[0 x %struct.anon*]*> [#uses=1]
211 @llvm.dbg.array23 = internal constant [2 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype14 to %struct.anon*), %struct.anon* bitcast (%llvm.dbg.derivedtype.type* @llvm.dbg.derivedtype19 to %struct.anon*) ], section "llvm.metadata" ; <[2 x %struct.anon*]*> [#uses=1]
212 @llvm.dbg.subrange24 = internal constant %llvm.dbg.subrange.type {
213 i32 393249,
214 i64 0,
215 i64 4 }, section "llvm.metadata" ; <%llvm.dbg.subrange.type*> [#uses=1]
216 @llvm.dbg.array25 = internal constant [1 x %struct.anon*] [ %struct.anon* bitcast (%llvm.dbg.subrange.type* @llvm.dbg.subrange24 to %struct.anon*) ], section "llvm.metadata" ; <[1 x %struct.anon*]*> [#uses=1]
217
218 define i8* @var() {
219 entry:
220 %retval = alloca i8* ; [#uses=3]
221 %tmp = alloca i8* ; [#uses=2]
222 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
223 call void @llvm.dbg.func.start( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*) )
224 call void @llvm.dbg.stoppoint( i32 2, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) )
225 %retval1 = bitcast i8** %retval to %struct.anon* ; <%struct.anon*> [#uses=1]
226 call void @llvm.dbg.declare( %struct.anon* %retval1, %struct.anon* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to %struct.anon*) )
227 bitcast %struct.S271* getelementptr ([0 x %struct.S271]* @a271, i32 0, i32 0) to i8* ; :0 [#uses=0]
228 store i8* bitcast ([0 x %struct.S271]* @a271 to i8*), i8** %tmp, align 4
229 %tmp2 = load i8** %tmp, align 4 ; [#uses=1]
230 store i8* %tmp2, i8** %retval, align 4
231 br label %return
232
233 return: ; preds = %entry
234 %retval3 = load i8** %retval ; [#uses=1]
235 call void @llvm.dbg.stoppoint( i32 2, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) )
236 call void @llvm.dbg.region.end( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram to %struct.anon*) )
237 ret i8* %retval3
238 }
239
240 declare void @llvm.dbg.func.start(%struct.anon*) nounwind
241
242 declare void @llvm.dbg.stoppoint(i32, i32, %struct.anon*) nounwind
243
244 declare void @llvm.dbg.declare(%struct.anon*, %struct.anon*) nounwind
245
246 declare void @llvm.dbg.region.end(%struct.anon*) nounwind
247
248 define i32 @main() {
249 entry:
250 %retval = alloca i32 ; [#uses=2]
251 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
252 call void @llvm.dbg.func.start( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*) )
253 call void @llvm.dbg.stoppoint( i32 3, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) )
254 %retval1 = bitcast i32* %retval to %struct.anon* ; <%struct.anon*> [#uses=1]
255 call void @llvm.dbg.declare( %struct.anon* %retval1, %struct.anon* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable10 to %struct.anon*) )
256 br label %return
257
258 return: ; preds = %entry
259 %retval2 = load i32* %retval ; [#uses=1]
260 call void @llvm.dbg.stoppoint( i32 3, i32 0, %struct.anon* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to %struct.anon*) )
261 call void @llvm.dbg.region.end( %struct.anon* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram6 to %struct.anon*) )
262 ret i32 %retval2
263 }