aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index d9f7640..2f640e2 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -198,8 +198,8 @@ codegentypedexpr(struct cgctx ctx, idx_t i, type_t *T, LLVMValueRef *outv)
mpf_clear(x);
return fwdnode(ctx.ast, i);
} else if (T->kind == TYPE_BOOL && TESTBIT(ctx.cnst, i)) {
- *outv = LLVMConstInt(type2llvm(ctx, ctx.types[i]), ctx.folds[i].b,
- false);
+ LLVMTypeRef T = LLVMInt1TypeInContext(ctx.ctx);
+ *outv = LLVMConstInt(T, ctx.folds[i].b, false);
return fwdnode(ctx.ast, i);
}