@@ -2011,7 +2011,7 @@ CodeGen::RValue CGObjCMac::GenerateMessageSendSuper(
2011
2011
CGF.Builder .CreateStructGEP (ObjCSuper, 0 ));
2012
2012
2013
2013
// If this is a class message the metaclass is passed as the target.
2014
- llvm::Type *ClassTyPtr = llvm::PointerType::getUnqual (ObjCTypes. ClassTy );
2014
+ llvm::Type *ClassTyPtr = llvm::PointerType::getUnqual (VMContext );
2015
2015
llvm::Value *Target;
2016
2016
if (IsClassMessage) {
2017
2017
if (isCategoryImpl) {
@@ -5657,7 +5657,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5657
5657
IvarOffsetVarTy = LongTy;
5658
5658
5659
5659
ObjectPtrTy = cast<llvm::PointerType>(Types.ConvertType (Ctx.getObjCIdType ()));
5660
- PtrObjectPtrTy = llvm::PointerType::getUnqual (ObjectPtrTy );
5660
+ PtrObjectPtrTy = llvm::PointerType::getUnqual (VMContext );
5661
5661
SelectorPtrTy =
5662
5662
cast<llvm::PointerType>(Types.ConvertType (Ctx.getObjCSelType ()));
5663
5663
@@ -5688,7 +5688,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5688
5688
SuperPtrCTy = Ctx.getPointerType (SuperCTy);
5689
5689
5690
5690
SuperTy = cast<llvm::StructType>(Types.ConvertType (SuperCTy));
5691
- SuperPtrTy = llvm::PointerType::getUnqual (SuperTy );
5691
+ SuperPtrTy = llvm::PointerType::getUnqual (VMContext );
5692
5692
5693
5693
// struct _prop_t {
5694
5694
// char *name;
@@ -5704,7 +5704,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5704
5704
PropertyListTy = llvm::StructType::create (
5705
5705
" struct._prop_list_t" , IntTy, IntTy, llvm::ArrayType::get (PropertyTy, 0 ));
5706
5706
// struct _prop_list_t *
5707
- PropertyListPtrTy = llvm::PointerType::getUnqual (PropertyListTy );
5707
+ PropertyListPtrTy = llvm::PointerType::getUnqual (VMContext );
5708
5708
5709
5709
// struct _objc_method {
5710
5710
// SEL _cmd;
@@ -5716,7 +5716,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
5716
5716
5717
5717
// struct _objc_cache *
5718
5718
CacheTy = llvm::StructType::create (VMContext, " struct._objc_cache" );
5719
- CachePtrTy = llvm::PointerType::getUnqual (CacheTy );
5719
+ CachePtrTy = llvm::PointerType::getUnqual (VMContext );
5720
5720
}
5721
5721
5722
5722
ObjCTypesHelper::ObjCTypesHelper (CodeGen::CodeGenModule &cgm)
@@ -5737,8 +5737,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5737
5737
llvm::ArrayType::get (MethodDescriptionTy, 0 ));
5738
5738
5739
5739
// struct _objc_method_description_list *
5740
- MethodDescriptionListPtrTy =
5741
- llvm::PointerType::getUnqual (MethodDescriptionListTy);
5740
+ MethodDescriptionListPtrTy = llvm::PointerType::getUnqual (VMContext);
5742
5741
5743
5742
// Protocol description structures
5744
5743
@@ -5756,7 +5755,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5756
5755
PropertyListPtrTy);
5757
5756
5758
5757
// struct _objc_protocol_extension *
5759
- ProtocolExtensionPtrTy = llvm::PointerType::getUnqual (ProtocolExtensionTy );
5758
+ ProtocolExtensionPtrTy = llvm::PointerType::getUnqual (VMContext );
5760
5759
5761
5760
// Handle construction of Protocol and ProtocolList types
5762
5761
@@ -5779,9 +5778,9 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5779
5778
" struct._objc_protocol_list" );
5780
5779
5781
5780
// struct _objc_protocol_list *
5782
- ProtocolListPtrTy = llvm::PointerType::getUnqual (ProtocolListTy );
5781
+ ProtocolListPtrTy = llvm::PointerType::getUnqual (VMContext );
5783
5782
5784
- ProtocolPtrTy = llvm::PointerType::getUnqual (ProtocolTy );
5783
+ ProtocolPtrTy = llvm::PointerType::getUnqual (VMContext );
5785
5784
5786
5785
// Class description structures
5787
5786
@@ -5795,17 +5794,17 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5795
5794
5796
5795
// struct _objc_ivar_list *
5797
5796
IvarListTy = llvm::StructType::create (VMContext, " struct._objc_ivar_list" );
5798
- IvarListPtrTy = llvm::PointerType::getUnqual (IvarListTy );
5797
+ IvarListPtrTy = llvm::PointerType::getUnqual (VMContext );
5799
5798
5800
5799
// struct _objc_method_list *
5801
5800
MethodListTy =
5802
5801
llvm::StructType::create (VMContext, " struct._objc_method_list" );
5803
- MethodListPtrTy = llvm::PointerType::getUnqual (MethodListTy );
5802
+ MethodListPtrTy = llvm::PointerType::getUnqual (VMContext );
5804
5803
5805
5804
// struct _objc_class_extension *
5806
5805
ClassExtensionTy = llvm::StructType::create (
5807
5806
" struct._objc_class_extension" , IntTy, Int8PtrTy, PropertyListPtrTy);
5808
- ClassExtensionPtrTy = llvm::PointerType::getUnqual (ClassExtensionTy );
5807
+ ClassExtensionPtrTy = llvm::PointerType::getUnqual (VMContext );
5809
5808
5810
5809
// struct _objc_class {
5811
5810
// Class isa;
@@ -5828,7 +5827,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5828
5827
Int8PtrTy, ClassExtensionPtrTy},
5829
5828
" struct._objc_class" );
5830
5829
5831
- ClassPtrTy = llvm::PointerType::getUnqual (ClassTy );
5830
+ ClassPtrTy = llvm::PointerType::getUnqual (VMContext );
5832
5831
5833
5832
// struct _objc_category {
5834
5833
// char *category_name;
@@ -5857,7 +5856,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
5857
5856
SymtabTy = llvm::StructType::create (" struct._objc_symtab" , LongTy,
5858
5857
SelectorPtrTy, ShortTy, ShortTy,
5859
5858
llvm::ArrayType::get (Int8PtrTy, 0 ));
5860
- SymtabPtrTy = llvm::PointerType::getUnqual (SymtabTy );
5859
+ SymtabPtrTy = llvm::PointerType::getUnqual (VMContext );
5861
5860
5862
5861
// struct _objc_module {
5863
5862
// long version;
@@ -5892,7 +5891,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5892
5891
llvm::StructType::create (" struct.__method_list_t" , IntTy, IntTy,
5893
5892
llvm::ArrayType::get (MethodTy, 0 ));
5894
5893
// struct method_list_t *
5895
- MethodListnfABIPtrTy = llvm::PointerType::getUnqual (MethodListnfABITy );
5894
+ MethodListnfABIPtrTy = llvm::PointerType::getUnqual (VMContext );
5896
5895
5897
5896
// struct _protocol_t {
5898
5897
// id isa; // NULL
@@ -5918,7 +5917,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5918
5917
PropertyListPtrTy);
5919
5918
5920
5919
// struct _protocol_t*
5921
- ProtocolnfABIPtrTy = llvm::PointerType::getUnqual (ProtocolnfABITy );
5920
+ ProtocolnfABIPtrTy = llvm::PointerType::getUnqual (VMContext );
5922
5921
5923
5922
// struct _protocol_list_t {
5924
5923
// long protocol_count; // Note, this is 32/64 bit
@@ -5929,7 +5928,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5929
5928
" struct._objc_protocol_list" );
5930
5929
5931
5930
// struct _objc_protocol_list*
5932
- ProtocolListnfABIPtrTy = llvm::PointerType::getUnqual (ProtocolListnfABITy );
5931
+ ProtocolListnfABIPtrTy = llvm::PointerType::getUnqual (VMContext );
5933
5932
5934
5933
// struct _ivar_t {
5935
5934
// unsigned [long] int *offset; // pointer to ivar offset location
@@ -5939,8 +5938,8 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5939
5938
// uint32_t size;
5940
5939
// }
5941
5940
IvarnfABITy = llvm::StructType::create (
5942
- " struct._ivar_t" , llvm::PointerType::getUnqual (IvarOffsetVarTy) ,
5943
- Int8PtrTy, Int8PtrTy, IntTy, IntTy);
5941
+ " struct._ivar_t" , llvm::PointerType::getUnqual (VMContext), Int8PtrTy ,
5942
+ Int8PtrTy, IntTy, IntTy);
5944
5943
5945
5944
// struct _ivar_list_t {
5946
5945
// uint32 entsize; // sizeof(struct _ivar_t)
@@ -5951,7 +5950,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5951
5950
llvm::StructType::create (" struct._ivar_list_t" , IntTy, IntTy,
5952
5951
llvm::ArrayType::get (IvarnfABITy, 0 ));
5953
5952
5954
- IvarListnfABIPtrTy = llvm::PointerType::getUnqual (IvarListnfABITy );
5953
+ IvarListnfABIPtrTy = llvm::PointerType::getUnqual (VMContext );
5955
5954
5956
5955
// struct _class_ro_t {
5957
5956
// uint32_t const flags;
@@ -5987,12 +5986,12 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
5987
5986
ClassnfABITy = llvm::StructType::create (
5988
5987
{llvm::PointerType::getUnqual (VMContext),
5989
5988
llvm::PointerType::getUnqual (VMContext), CachePtrTy,
5990
- llvm::PointerType::getUnqual (ImpnfABITy ),
5991
- llvm::PointerType::getUnqual (ClassRonfABITy )},
5989
+ llvm::PointerType::getUnqual (VMContext ),
5990
+ llvm::PointerType::getUnqual (VMContext )},
5992
5991
" struct._class_t" );
5993
5992
5994
5993
// LLVM for struct _class_t *
5995
- ClassnfABIPtrTy = llvm::PointerType::getUnqual (ClassnfABITy );
5994
+ ClassnfABIPtrTy = llvm::PointerType::getUnqual (VMContext );
5996
5995
5997
5996
// struct _category_t {
5998
5997
// const char * const name;
@@ -6036,7 +6035,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
6036
6035
MessageRefTy = cast<llvm::StructType>(Types.ConvertType (MessageRefCTy));
6037
6036
6038
6037
// MessageRefPtrTy - LLVM for struct _message_ref_t*
6039
- MessageRefPtrTy = llvm::PointerType::getUnqual (MessageRefTy );
6038
+ MessageRefPtrTy = llvm::PointerType::getUnqual (VMContext );
6040
6039
6041
6040
// SuperMessageRefTy - LLVM for:
6042
6041
// struct _super_message_ref_t {
@@ -6047,17 +6046,17 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(
6047
6046
ImpnfABITy, SelectorPtrTy);
6048
6047
6049
6048
// SuperMessageRefPtrTy - LLVM for struct _super_message_ref_t*
6050
- SuperMessageRefPtrTy = llvm::PointerType::getUnqual (SuperMessageRefTy );
6049
+ SuperMessageRefPtrTy = llvm::PointerType::getUnqual (VMContext );
6051
6050
6052
6051
// struct objc_typeinfo {
6053
6052
// const void** vtable; // objc_ehtype_vtable + 2
6054
6053
// const char* name; // c++ typeinfo string
6055
6054
// Class cls;
6056
6055
// };
6057
6056
EHTypeTy = llvm::StructType::create (" struct._objc_typeinfo" ,
6058
- llvm::PointerType::getUnqual (Int8PtrTy ),
6057
+ llvm::PointerType::getUnqual (VMContext ),
6059
6058
Int8PtrTy, ClassnfABIPtrTy);
6060
- EHTypePtrTy = llvm::PointerType::getUnqual (EHTypeTy );
6059
+ EHTypePtrTy = llvm::PointerType::getUnqual (VMContext );
6061
6060
}
6062
6061
6063
6062
llvm::Function *CGObjCNonFragileABIMac::ModuleInitFunction () {
0 commit comments