authorgravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2020-12-26 11:22:16-05:00
committergravatar for jacoblevgw@gmail.comJacob G-W <jacoblevgw@gmail.com> 2020-12-26 11:22:16-05:00
log7f512f2236cf504775bb15002be89ecbb28a7679
tree7161c85cf2b76b7513aae75f4a2ce9b35fe85fd0
parent504c78c022567439d2ac43096ae19fc558bce8fc

fix test cases to use str zir inst instead of just a quoted string


1 files changed, 13 insertions(+), 9 deletions(-)

test/stage2/zir.zig+13-9
......@@ -150,18 +150,20 @@ pub fn addCases(ctx: *TestContext) !void {
150150 \\})
151151 \\
152152 \\@a = fn(@fnty, {
153 \\ %0 = call(@b, [])
153 \\ %0 = call(@c, [])
154154 \\ %1 = returnvoid()
155155 \\})
156156 \\
157 \\@b = fn(@fnty, {
158 \\ %9 = compileerror("message")
157 \\@b = str("message")
158 \\
159 \\@c = fn(@fnty, {
160 \\ %9 = compileerror(@b)
159161 \\ %0 = call(@a, [])
160162 \\ %1 = returnvoid()
161163 \\})
162164 ,
163165 &[_][]const u8{
164 ":18:21: error: message",
166 ":20:21: error: message",
165167 },
166168 );
167169 // Now we remove the call to `a`. `a` and `b` form a cycle, but no entry points are
......@@ -179,20 +181,22 @@ pub fn addCases(ctx: *TestContext) !void {
179181 \\})
180182 \\
181183 \\@a = fn(@fnty, {
182 \\ %0 = call(@b, [])
184 \\ %0 = call(@c, [])
183185 \\ %1 = returnvoid()
184186 \\})
185187 \\
186 \\@b = fn(@fnty, {
187 \\ %9 = compileerror("message")
188 \\@b = str("message")
189 \\
190 \\@c = fn(@fnty, {
191 \\ %9 = compileerror(@b)
188192 \\ %0 = call(@a, [])
189193 \\ %1 = returnvoid()
190194 \\})
191195 ,
192196 \\@void = primitive(void)
193197 \\@fnty = fntype([], @void, cc=C)
194 \\@9 = declref("9__anon_2")
195 \\@9__anon_2 = str("entry")
198 \\@9 = declref("9__anon_3")
199 \\@9__anon_3 = str("entry")
196200 \\@unnamed$4 = str("entry")
197201 \\@unnamed$5 = export(@unnamed$4, "entry")
198202 \\@11 = primitive(void_value)