@@ -462,7 +462,7 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
462462 FunctionType::get (ns_str_ty, CFSCWB_arg_types, false );
463463
464464 // 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 () );
466466 Constant *CFSCWB_addr_int =
467467 ConstantInt::get (m_intptr_ty, CFStringCreateWithBytes_addr, false );
468468 m_CFStringCreateWithBytes = {
@@ -814,7 +814,7 @@ bool IRForTarget::RewriteObjCSelector(Instruction *selector_load) {
814814 FunctionType::get (sel_ptr_type, srN_arg_types, false );
815815
816816 // 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 () );
818818 Constant *srN_addr_int =
819819 ConstantInt::get (m_intptr_ty, sel_registerName_addr, false );
820820 m_sel_registerName = {srN_type,
@@ -1031,7 +1031,7 @@ bool IRForTarget::MaybeHandleVariable(Value *llvm_value_ptr) {
10311031 //
10321032 // We also do this for any user-declared persistent variables.
10331033 compiler_type = compiler_type.GetPointerType ();
1034- value_type = PointerType::get (global_variable->getType (), 0 );
1034+ value_type = PointerType::getUnqual (global_variable->getContext () );
10351035 } else {
10361036 value_type = global_variable->getType ();
10371037 }
0 commit comments