WIP10 - Add debug assertions to printf
This commit is contained in:
parent
cf9bfec02d
commit
18ec4c1eac
|
@ -748,6 +748,9 @@ fn polymorphic_print<'ctx>(
|
|||
generator: &mut dyn CodeGenerator,
|
||||
fmt: String,
|
||||
args: Vec<BasicValueEnum<'ctx>>| {
|
||||
debug_assert!(!fmt.is_empty());
|
||||
debug_assert_eq!(fmt.as_bytes().last().unwrap(), &0u8);
|
||||
|
||||
let fn_name = if as_rtio { "rtio_log" } else { "core_log" };
|
||||
let print_fn = ctx.module.get_function(fn_name).unwrap_or_else(|| {
|
||||
let llvm_pi8 = ctx.ctx.i8_type().ptr_type(AddressSpace::default());
|
||||
|
|
Loading…
Reference in New Issue