| ... | @@ -727,6 +727,11 @@ pub const FuncGen = struct { | ... | @@ -727,6 +727,11 @@ pub const FuncGen = struct { |
| 727 | } | 727 | } |
| 728 | | 728 | |
| 729 | fn genRet(self: *FuncGen, inst: *Inst.UnOp) !?*const llvm.Value { | 729 | fn genRet(self: *FuncGen, inst: *Inst.UnOp) !?*const llvm.Value { |
| | 730 | if (!inst.operand.ty.hasCodeGenBits()) { |
| | 731 | // TODO: in astgen these instructions should turn into `retvoid` instructions. |
| | 732 | _ = self.builder.buildRetVoid(); |
| | 733 | return null; |
| | 734 | } |
| 730 | _ = self.builder.buildRet(try self.resolveInst(inst.operand)); | 735 | _ = self.builder.buildRet(try self.resolveInst(inst.operand)); |
| 731 | return null; | 736 | return null; |
| 732 | } | 737 | } |