stage2: fix bitcast to optional ptr in llvm backend; omit safety check for intToPtr on optional ptr
This commit is contained in:
@@ -3892,7 +3892,7 @@ pub const FuncGen = struct {
|
||||
return self.builder.buildBitCast(operand, llvm_dest_ty.pointerType(0), "");
|
||||
}
|
||||
|
||||
if (operand_ty.zigTypeTag() == .Int and inst_ty.zigTypeTag() == .Pointer) {
|
||||
if (operand_ty.zigTypeTag() == .Int and inst_ty.isPtrAtRuntime()) {
|
||||
return self.builder.buildIntToPtr(operand, llvm_dest_ty, "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user