From 69d78bdae4a5d0ec5877add5936ae8e9daf09140 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 17 Mar 2022 20:06:40 -0700 Subject: [PATCH] stage2 test harness: ask for the backend explicitly Follow-up to 35d6ee08c468642969b594b711dd6448bbaefa89 --- src/test.zig | 4 ++-- test/stage2/llvm.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test.zig b/src/test.zig index 972bd7bcbd..e2be5e2172 100644 --- a/src/test.zig +++ b/src/test.zig @@ -886,9 +886,9 @@ pub const TestContext = struct { .directory = emit_directory, .basename = "test_case.h", } else null; - const use_llvm: ?bool = switch (case.backend) { + const use_llvm: bool = switch (case.backend) { .llvm => true, - else => null, + else => false, }; const comp = try Compilation.create(allocator, .{ .local_cache_directory = zig_cache_directory, diff --git a/test/stage2/llvm.zig b/test/stage2/llvm.zig index eaeb76462a..bf538efaca 100644 --- a/test/stage2/llvm.zig +++ b/test/stage2/llvm.zig @@ -432,7 +432,7 @@ pub fn addCases(ctx: *TestContext) !void { \\ a = @as(?usize, null); \\} , &[_][]const u8{ - ":3:21: error: expected pointer type, found '?usize'", + ":3:21: error: expected *anyopaque, found ?usize", }); } }