mirror of
https://github.com/ziglang/zig.git
synced 2026-01-11 09:55:12 +00:00
stage2: handle void value in genRet in LLVM backend
This commit is contained in:
parent
d73b0473a1
commit
982df37135
@ -727,6 +727,11 @@ pub const FuncGen = struct {
|
||||
}
|
||||
|
||||
fn genRet(self: *FuncGen, inst: *Inst.UnOp) !?*const llvm.Value {
|
||||
if (!inst.operand.ty.hasCodeGenBits()) {
|
||||
// TODO: in astgen these instructions should turn into `retvoid` instructions.
|
||||
_ = self.builder.buildRetVoid();
|
||||
return null;
|
||||
}
|
||||
_ = self.builder.buildRet(try self.resolveInst(inst.operand));
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user