mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 16:43:07 +00:00
stage2: get formatted printing (somewhat) working
This commit is contained in:
parent
4d658f83ed
commit
593d23c0d7
@ -141,8 +141,20 @@ pub fn main2() anyerror!void {
|
||||
}
|
||||
};
|
||||
}
|
||||
if (builtin.zig_backend == .stage2_llvm or
|
||||
builtin.zig_backend == .stage2_wasm or
|
||||
if (builtin.zig_backend == .stage2_llvm) {
|
||||
const stderr = std.io.getStdErr().writer();
|
||||
const ok_count = builtin.test_functions.len - skipped - failed;
|
||||
if (ok_count == builtin.test_functions.len) {
|
||||
try stderr.print("All {d} tests passed.\n", .{ok_count});
|
||||
} else {
|
||||
try stderr.print("{d} passed; ", .{ok_count});
|
||||
try stderr.print("{d} skipped; ", .{skipped});
|
||||
try stderr.print("{d} failed.\n", .{failed});
|
||||
}
|
||||
if (failed != 0) {
|
||||
std.process.exit(1);
|
||||
}
|
||||
} else if (builtin.zig_backend == .stage2_wasm or
|
||||
builtin.zig_backend == .stage2_x86_64)
|
||||
{
|
||||
const passed = builtin.test_functions.len - skipped - failed;
|
||||
|
||||
@ -10975,8 +10975,7 @@ fn zirCondbr(
|
||||
|
||||
if (try sema.resolveDefinedValue(parent_block, src, cond)) |cond_val| {
|
||||
const body = if (cond_val.toBool()) then_body else else_body;
|
||||
_ = try sema.analyzeBody(parent_block, body);
|
||||
return always_noreturn;
|
||||
return sema.analyzeBodyInner(parent_block, body);
|
||||
}
|
||||
|
||||
const gpa = sema.gpa;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user