@@ -462,7 +462,7 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
462
462
FunctionType::get (ns_str_ty, CFSCWB_arg_types, false );
463
463
464
464
// Build the constant containing the pointer to the function
465
- PointerType *CFSCWB_ptr_ty = PointerType::getUnqual (CFSCWB_ty );
465
+ PointerType *CFSCWB_ptr_ty = PointerType::getUnqual (m_module-> getContext () );
466
466
Constant *CFSCWB_addr_int =
467
467
ConstantInt::get (m_intptr_ty, CFStringCreateWithBytes_addr, false );
468
468
m_CFStringCreateWithBytes = {
@@ -814,7 +814,7 @@ bool IRForTarget::RewriteObjCSelector(Instruction *selector_load) {
814
814
FunctionType::get (sel_ptr_type, srN_arg_types, false );
815
815
816
816
// Build the constant containing the pointer to the function
817
- PointerType *srN_ptr_ty = PointerType::getUnqual (srN_type );
817
+ PointerType *srN_ptr_ty = PointerType::getUnqual (m_module-> getContext () );
818
818
Constant *srN_addr_int =
819
819
ConstantInt::get (m_intptr_ty, sel_registerName_addr, false );
820
820
m_sel_registerName = {srN_type,
@@ -1031,7 +1031,7 @@ bool IRForTarget::MaybeHandleVariable(Value *llvm_value_ptr) {
1031
1031
//
1032
1032
// We also do this for any user-declared persistent variables.
1033
1033
compiler_type = compiler_type.GetPointerType ();
1034
- value_type = PointerType::get (global_variable->getType (), 0 );
1034
+ value_type = PointerType::getUnqual (global_variable->getContext () );
1035
1035
} else {
1036
1036
value_type = global_variable->getType ();
1037
1037
}
0 commit comments