AstGen: fix nosuspendExpr handling result location twice

This commit is contained in:
Veikka Tuominen
2022-03-12 13:40:47 +02:00
parent 487ee79ec9
commit d532c21d89
2 changed files with 3 additions and 4 deletions

View File

@@ -822,7 +822,7 @@ pub const DwarfInfo = struct {
// in the list itself.
// If no starting value is specified use zero.
var base_address = compile_unit.die.getAttrAddr(AT.low_pc) catch |err| switch (err) {
error.MissingDebugInfo => 0,
error.MissingDebugInfo => @as(u64, 0), // TODO https://github.com/ziglang/zig/issues/11135
else => return err,
};

View File

@@ -1035,9 +1035,8 @@ fn nosuspendExpr(
});
}
gz.nosuspend_node = node;
const result = try expr(gz, scope, rl, body_node);
gz.nosuspend_node = 0;
return rvalue(gz, rl, result, node);
defer gz.nosuspend_node = 0;
return expr(gz, scope, rl, body_node);
}
fn suspendExpr(