std.dwarf: avoid some async/await stuff in stage2 builds

This commit is contained in:
Andrew Kelley 2022-03-15 19:42:48 -07:00
parent 2583be7585
commit cfc31b5bbd

View File

@ -1,3 +1,4 @@
const builtin = @import("builtin");
const std = @import("std.zig");
const debug = std.debug;
const fs = std.fs;
@ -502,6 +503,9 @@ fn parseFormValue(allocator: mem.Allocator, in_stream: anytype, form_id: u64, en
FORM.line_strp => FormValue{ .LineStrPtr = try readAddress(in_stream, endian, is_64) },
FORM.indirect => {
const child_form_id = try nosuspend leb.readULEB128(u64, in_stream);
if (builtin.zig_backend != .stage1) {
return parseFormValue(allocator, in_stream, child_form_id, endian, is_64);
}
const F = @TypeOf(async parseFormValue(allocator, in_stream, child_form_id, endian, is_64));
var frame = try allocator.create(F);
defer allocator.destroy(frame);