Get llvm value with expected type (#256) #259

Merged
sb10q merged 1 commits from get_symbol_val_with_type into master 2024-08-17 17:37:19 +08:00

View File

@ -150,11 +150,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> {
};
let actual_ptr_type =
self.get_llvm_type(generator, ty).ptr_type(AddressSpace::Generic);
self.builder.build_bitcast(
self.ctx.i8_type().ptr_type(AddressSpace::Generic).const_null(),
actual_ptr_type,
"default_opt_none",
)
actual_ptr_type.const_null().into()
}
}
}