Skip to content

Commit

Permalink
fix bug in writing values of type i1
Browse files Browse the repository at this point in the history
  • Loading branch information
theo25 committed Aug 20, 2024
1 parent 1226f16 commit 1ce3f01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/codegen/ProofEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,17 @@ llvm::CallInst *proof_event::emit_write_side_condition_event_post(

auto *void_ty = llvm::Type::getVoidTy(ctx_);
auto *i8_ptr_ty = llvm::PointerType::getUnqual(ctx_);
auto *i1_ty = llvm::Type::getInt1Ty(ctx_);
auto *i64_ty = llvm::Type::getInt64Ty(ctx_);

auto *func_ty
= llvm::FunctionType::get(void_ty, {i8_ptr_ty, i64_ty, i1_ty}, false);
= llvm::FunctionType::get(void_ty, {i8_ptr_ty, i64_ty, i8_ptr_ty}, false);

auto *func = get_or_insert_function(
module_, "write_side_condition_event_post_to_proof_trace", func_ty);

auto *var_ordinal = llvm::ConstantInt::get(i64_ty, ordinal);
return b.CreateCall(func, {proof_writer, var_ordinal, val});
auto *var_val = b.CreateIntToPtr(val, i8_ptr_ty);
return b.CreateCall(func, {proof_writer, var_ordinal, var_val});
}

llvm::BinaryOperator *proof_event::emit_no_op(llvm::BasicBlock *insert_at_end) {
Expand Down

0 comments on commit 1ce3f01

Please sign in to comment.