aboutsummaryrefslogtreecommitdiff
path: root/test/stage2
diff options
context:
space:
mode:
authorg-w1 <jacoblevgw@gmail.com>2020-12-26 11:22:16 -0500
committerg-w1 <jacoblevgw@gmail.com>2020-12-26 11:22:16 -0500
commit7f512f2236cf504775bb15002be89ecbb28a7679 (patch)
tree7161c85cf2b76b7513aae75f4a2ce9b35fe85fd0 /test/stage2
parent504c78c022567439d2ac43096ae19fc558bce8fc (diff)
downloadzig-7f512f2236cf504775bb15002be89ecbb28a7679.tar.gz
zig-7f512f2236cf504775bb15002be89ecbb28a7679.zip
fix test cases to use str zir inst instead of just a quoted string
Diffstat (limited to 'test/stage2')
-rw-r--r--test/stage2/zir.zig22
1 files changed, 13 insertions, 9 deletions
diff --git a/test/stage2/zir.zig b/test/stage2/zir.zig
index 82159e4f8e..da4038e792 100644
--- a/test/stage2/zir.zig
+++ b/test/stage2/zir.zig
@@ -150,18 +150,20 @@ pub fn addCases(ctx: *TestContext) !void {
\\})
\\
\\@a = fn(@fnty, {
- \\ %0 = call(@b, [])
+ \\ %0 = call(@c, [])
\\ %1 = returnvoid()
\\})
\\
- \\@b = fn(@fnty, {
- \\ %9 = compileerror("message")
+ \\@b = str("message")
+ \\
+ \\@c = fn(@fnty, {
+ \\ %9 = compileerror(@b)
\\ %0 = call(@a, [])
\\ %1 = returnvoid()
\\})
,
&[_][]const u8{
- ":18:21: error: message",
+ ":20:21: error: message",
},
);
// 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 {
\\})
\\
\\@a = fn(@fnty, {
- \\ %0 = call(@b, [])
+ \\ %0 = call(@c, [])
\\ %1 = returnvoid()
\\})
\\
- \\@b = fn(@fnty, {
- \\ %9 = compileerror("message")
+ \\@b = str("message")
+ \\
+ \\@c = fn(@fnty, {
+ \\ %9 = compileerror(@b)
\\ %0 = call(@a, [])
\\ %1 = returnvoid()
\\})
,
\\@void = primitive(void)
\\@fnty = fntype([], @void, cc=C)
- \\@9 = declref("9__anon_2")
- \\@9__anon_2 = str("entry")
+ \\@9 = declref("9__anon_3")
+ \\@9__anon_3 = str("entry")
\\@unnamed$4 = str("entry")
\\@unnamed$5 = export(@unnamed$4, "entry")
\\@11 = primitive(void_value)