From f66f66b3a4bd6e84d176c61e250dd71ea602a26b Mon Sep 17 00:00:00 2001 From: ychenfo Date: Sat, 9 Apr 2022 04:18:27 +0800 Subject: [PATCH] nac3core, artiq: remove unnecessary ptr casts --- nac3core/src/codegen/expr.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 8c01e89d..4f3d2bec 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -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() } } }