mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Corrected ptr->bool conversion. Avoid checking function body if function is invalid. Switch defer test cases.
This commit is contained in:
committed by
Christoffer Lerno
parent
c839eb50c8
commit
90ab4f07b9
@@ -294,7 +294,7 @@ LLVMValueRef gencontext_emit_cast(GenContext *context, CastKind cast_kind, LLVMV
|
||||
case CAST_EUBOOL:
|
||||
return LLVMBuildICmp(context->builder, LLVMIntNE, value, gencontext_emit_no_error_union(context), "eubool");
|
||||
case CAST_PTRBOOL:
|
||||
return LLVMBuildICmp(context->builder, LLVMIntNE, value, LLVMConstPointerNull(llvm_type(from_type->canonical)), "ptrbool");
|
||||
return LLVMBuildIsNotNull(context->builder, value, "ptrbool");
|
||||
case CAST_BOOLINT:
|
||||
return LLVMBuildTrunc(context->builder, value, llvm_type(to_type), "boolsi");
|
||||
case CAST_FPBOOL:
|
||||
|
||||
Reference in New Issue
Block a user