@@ -365,7 +365,7 @@ class ObjCCommonTypesHelper {
365
365
// / GcReadWeakFn -- LLVM objc_read_weak (id *src) function.
366
366
llvm::FunctionCallee getGcReadWeakFn () {
367
367
// id objc_read_weak (id *)
368
- llvm::Type *args[] = { ObjectPtrTy-> getPointerTo () };
368
+ llvm::Type *args[] = {CGM. UnqualPtrTy };
369
369
llvm::FunctionType *FTy =
370
370
llvm::FunctionType::get (ObjectPtrTy, args, false );
371
371
return CGM.CreateRuntimeFunction (FTy, " objc_read_weak" );
@@ -374,7 +374,7 @@ class ObjCCommonTypesHelper {
374
374
// / GcAssignWeakFn -- LLVM objc_assign_weak function.
375
375
llvm::FunctionCallee getGcAssignWeakFn () {
376
376
// id objc_assign_weak (id, id *)
377
- llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy-> getPointerTo () };
377
+ llvm::Type *args[] = {ObjectPtrTy, CGM. UnqualPtrTy };
378
378
llvm::FunctionType *FTy =
379
379
llvm::FunctionType::get (ObjectPtrTy, args, false );
380
380
return CGM.CreateRuntimeFunction (FTy, " objc_assign_weak" );
@@ -383,7 +383,7 @@ class ObjCCommonTypesHelper {
383
383
// / GcAssignGlobalFn -- LLVM objc_assign_global function.
384
384
llvm::FunctionCallee getGcAssignGlobalFn () {
385
385
// id objc_assign_global(id, id *)
386
- llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy-> getPointerTo () };
386
+ llvm::Type *args[] = {ObjectPtrTy, CGM. UnqualPtrTy };
387
387
llvm::FunctionType *FTy =
388
388
llvm::FunctionType::get (ObjectPtrTy, args, false );
389
389
return CGM.CreateRuntimeFunction (FTy, " objc_assign_global" );
@@ -392,7 +392,7 @@ class ObjCCommonTypesHelper {
392
392
// / GcAssignThreadLocalFn -- LLVM objc_assign_threadlocal function.
393
393
llvm::FunctionCallee getGcAssignThreadLocalFn () {
394
394
// id objc_assign_threadlocal(id src, id * dest)
395
- llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy-> getPointerTo () };
395
+ llvm::Type *args[] = {ObjectPtrTy, CGM. UnqualPtrTy };
396
396
llvm::FunctionType *FTy =
397
397
llvm::FunctionType::get (ObjectPtrTy, args, false );
398
398
return CGM.CreateRuntimeFunction (FTy, " objc_assign_threadlocal" );
@@ -401,8 +401,7 @@ class ObjCCommonTypesHelper {
401
401
// / GcAssignIvarFn -- LLVM objc_assign_ivar function.
402
402
llvm::FunctionCallee getGcAssignIvarFn () {
403
403
// id objc_assign_ivar(id, id *, ptrdiff_t)
404
- llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy->getPointerTo (),
405
- CGM.PtrDiffTy };
404
+ llvm::Type *args[] = {ObjectPtrTy, CGM.UnqualPtrTy , CGM.PtrDiffTy };
406
405
llvm::FunctionType *FTy =
407
406
llvm::FunctionType::get (ObjectPtrTy, args, false );
408
407
return CGM.CreateRuntimeFunction (FTy, " objc_assign_ivar" );
@@ -419,7 +418,7 @@ class ObjCCommonTypesHelper {
419
418
// / GcAssignStrongCastFn -- LLVM objc_assign_strongCast function.
420
419
llvm::FunctionCallee getGcAssignStrongCastFn () {
421
420
// id objc_assign_strongCast(id, id *)
422
- llvm::Type *args[] = { ObjectPtrTy, ObjectPtrTy-> getPointerTo () };
421
+ llvm::Type *args[] = {ObjectPtrTy, CGM. UnqualPtrTy };
423
422
llvm::FunctionType *FTy =
424
423
llvm::FunctionType::get (ObjectPtrTy, args, false );
425
424
return CGM.CreateRuntimeFunction (FTy, " objc_assign_strongCast" );
@@ -554,23 +553,23 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper {
554
553
555
554
// / ExceptionTryEnterFn - LLVM objc_exception_try_enter function.
556
555
llvm::FunctionCallee getExceptionTryEnterFn () {
557
- llvm::Type *params[] = { ExceptionDataTy-> getPointerTo () };
556
+ llvm::Type *params[] = {CGM. UnqualPtrTy };
558
557
return CGM.CreateRuntimeFunction (
559
558
llvm::FunctionType::get (CGM.VoidTy , params, false ),
560
559
" objc_exception_try_enter" );
561
560
}
562
561
563
562
// / ExceptionTryExitFn - LLVM objc_exception_try_exit function.
564
563
llvm::FunctionCallee getExceptionTryExitFn () {
565
- llvm::Type *params[] = { ExceptionDataTy-> getPointerTo () };
564
+ llvm::Type *params[] = {CGM. UnqualPtrTy };
566
565
return CGM.CreateRuntimeFunction (
567
566
llvm::FunctionType::get (CGM.VoidTy , params, false ),
568
567
" objc_exception_try_exit" );
569
568
}
570
569
571
570
// / ExceptionExtractFn - LLVM objc_exception_extract function.
572
571
llvm::FunctionCallee getExceptionExtractFn () {
573
- llvm::Type *params[] = { ExceptionDataTy-> getPointerTo () };
572
+ llvm::Type *params[] = {CGM. UnqualPtrTy };
574
573
return CGM.CreateRuntimeFunction (llvm::FunctionType::get (ObjectPtrTy,
575
574
params, false ),
576
575
" objc_exception_extract" );
@@ -587,7 +586,7 @@ class ObjCTypesHelper : public ObjCCommonTypesHelper {
587
586
// / SetJmpFn - LLVM _setjmp function.
588
587
llvm::FunctionCallee getSetJmpFn () {
589
588
// This is specifically the prototype for x86.
590
- llvm::Type *params[] = { CGM.Int32Ty -> getPointerTo () };
589
+ llvm::Type *params[] = {CGM.UnqualPtrTy };
591
590
return CGM.CreateRuntimeFunction (
592
591
llvm::FunctionType::get (CGM.Int32Ty , params, false ), " _setjmp" ,
593
592
llvm::AttributeList::get (CGM.getLLVMContext (),
@@ -6051,9 +6050,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
6051
6050
Int8PtrTy, PropertyListPtrTy);
6052
6051
6053
6052
// ImpnfABITy - LLVM for id (*)(id, SEL, ...)
6054
- llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy };
6055
- ImpnfABITy = llvm::FunctionType::get (ObjectPtrTy, params, false )
6056
- ->getPointerTo ();
6053
+ ImpnfABITy = CGM.UnqualPtrTy ;
6057
6054
6058
6055
// struct _class_t {
6059
6056
// struct _class_t *isa;
@@ -6469,8 +6466,7 @@ void CGObjCNonFragileABIMac::GenerateClass(const ObjCImplementationDecl *ID) {
6469
6466
llvm::GlobalValue::ExternalLinkage, nullptr ,
6470
6467
" _objc_empty_vtable" );
6471
6468
else
6472
- ObjCEmptyVtableVar =
6473
- llvm::ConstantPointerNull::get (ObjCTypes.ImpnfABITy ->getPointerTo ());
6469
+ ObjCEmptyVtableVar = llvm::ConstantPointerNull::get (CGM.UnqualPtrTy );
6474
6470
}
6475
6471
6476
6472
// FIXME: Is this correct (that meta class size is never computed)?
0 commit comments