|
@@ -106,7 +106,7 @@ private:
|
|
|
llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy };
|
|
|
llvm::Type *longDoubleType = llvm::Type::getX86_FP80Ty(VMContext);
|
|
|
llvm::Type *resultType =
|
|
|
- llvm::StructType::get(longDoubleType, longDoubleType, NULL);
|
|
|
+ llvm::StructType::get(longDoubleType, longDoubleType, nullptr);
|
|
|
|
|
|
return CGM.CreateRuntimeFunction(llvm::FunctionType::get(resultType,
|
|
|
params, true),
|
|
@@ -5033,7 +5033,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// char *attributes;
|
|
|
// }
|
|
|
PropertyTy = llvm::StructType::create("struct._prop_t",
|
|
|
- Int8PtrTy, Int8PtrTy, NULL);
|
|
|
+ Int8PtrTy, Int8PtrTy, nullptr);
|
|
|
|
|
|
// struct _prop_list_t {
|
|
|
// uint32_t entsize; // sizeof(struct _prop_t)
|
|
@@ -5042,7 +5042,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// }
|
|
|
PropertyListTy =
|
|
|
llvm::StructType::create("struct._prop_list_t", IntTy, IntTy,
|
|
|
- llvm::ArrayType::get(PropertyTy, 0), NULL);
|
|
|
+ llvm::ArrayType::get(PropertyTy, 0), nullptr);
|
|
|
// struct _prop_list_t *
|
|
|
PropertyListPtrTy = llvm::PointerType::getUnqual(PropertyListTy);
|
|
|
|
|
@@ -5053,7 +5053,7 @@ ObjCCommonTypesHelper::ObjCCommonTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// }
|
|
|
MethodTy = llvm::StructType::create("struct._objc_method",
|
|
|
SelectorPtrTy, Int8PtrTy, Int8PtrTy,
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// struct _objc_cache *
|
|
|
CacheTy = llvm::StructType::create(VMContext, "struct._objc_cache");
|
|
@@ -5069,16 +5069,15 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// }
|
|
|
MethodDescriptionTy =
|
|
|
llvm::StructType::create("struct._objc_method_description",
|
|
|
- SelectorPtrTy, Int8PtrTy, NULL);
|
|
|
+ SelectorPtrTy, Int8PtrTy, nullptr);
|
|
|
|
|
|
// struct _objc_method_description_list {
|
|
|
// int count;
|
|
|
// struct _objc_method_description[1];
|
|
|
// }
|
|
|
- MethodDescriptionListTy =
|
|
|
- llvm::StructType::create("struct._objc_method_description_list",
|
|
|
- IntTy,
|
|
|
- llvm::ArrayType::get(MethodDescriptionTy, 0),NULL);
|
|
|
+ MethodDescriptionListTy = llvm::StructType::create(
|
|
|
+ "struct._objc_method_description_list", IntTy,
|
|
|
+ llvm::ArrayType::get(MethodDescriptionTy, 0), nullptr);
|
|
|
|
|
|
// struct _objc_method_description_list *
|
|
|
MethodDescriptionListPtrTy =
|
|
@@ -5097,7 +5096,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
llvm::StructType::create("struct._objc_protocol_extension",
|
|
|
IntTy, MethodDescriptionListPtrTy,
|
|
|
MethodDescriptionListPtrTy, PropertyListPtrTy,
|
|
|
- Int8PtrPtrTy, NULL);
|
|
|
+ Int8PtrPtrTy, nullptr);
|
|
|
|
|
|
// struct _objc_protocol_extension *
|
|
|
ProtocolExtensionPtrTy = llvm::PointerType::getUnqual(ProtocolExtensionTy);
|
|
@@ -5112,7 +5111,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
ProtocolListTy->setBody(llvm::PointerType::getUnqual(ProtocolListTy),
|
|
|
LongTy,
|
|
|
llvm::ArrayType::get(ProtocolTy, 0),
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// struct _objc_protocol {
|
|
|
// struct _objc_protocol_extension *isa;
|
|
@@ -5125,7 +5124,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
llvm::PointerType::getUnqual(ProtocolListTy),
|
|
|
MethodDescriptionListPtrTy,
|
|
|
MethodDescriptionListPtrTy,
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// struct _objc_protocol_list *
|
|
|
ProtocolListPtrTy = llvm::PointerType::getUnqual(ProtocolListTy);
|
|
@@ -5140,7 +5139,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// int ivar_offset;
|
|
|
// }
|
|
|
IvarTy = llvm::StructType::create("struct._objc_ivar",
|
|
|
- Int8PtrTy, Int8PtrTy, IntTy, NULL);
|
|
|
+ Int8PtrTy, Int8PtrTy, IntTy, nullptr);
|
|
|
|
|
|
// struct _objc_ivar_list *
|
|
|
IvarListTy =
|
|
@@ -5155,7 +5154,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// struct _objc_class_extension *
|
|
|
ClassExtensionTy =
|
|
|
llvm::StructType::create("struct._objc_class_extension",
|
|
|
- IntTy, Int8PtrTy, PropertyListPtrTy, NULL);
|
|
|
+ IntTy, Int8PtrTy, PropertyListPtrTy, nullptr);
|
|
|
ClassExtensionPtrTy = llvm::PointerType::getUnqual(ClassExtensionTy);
|
|
|
|
|
|
ClassTy = llvm::StructType::create(VMContext, "struct._objc_class");
|
|
@@ -5186,7 +5185,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
ProtocolListPtrTy,
|
|
|
Int8PtrTy,
|
|
|
ClassExtensionPtrTy,
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
ClassPtrTy = llvm::PointerType::getUnqual(ClassTy);
|
|
|
|
|
@@ -5202,7 +5201,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
llvm::StructType::create("struct._objc_category",
|
|
|
Int8PtrTy, Int8PtrTy, MethodListPtrTy,
|
|
|
MethodListPtrTy, ProtocolListPtrTy,
|
|
|
- IntTy, PropertyListPtrTy, NULL);
|
|
|
+ IntTy, PropertyListPtrTy, nullptr);
|
|
|
|
|
|
// Global metadata structures
|
|
|
|
|
@@ -5216,7 +5215,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
SymtabTy =
|
|
|
llvm::StructType::create("struct._objc_symtab",
|
|
|
LongTy, SelectorPtrTy, ShortTy, ShortTy,
|
|
|
- llvm::ArrayType::get(Int8PtrTy, 0), NULL);
|
|
|
+ llvm::ArrayType::get(Int8PtrTy, 0), nullptr);
|
|
|
SymtabPtrTy = llvm::PointerType::getUnqual(SymtabTy);
|
|
|
|
|
|
// struct _objc_module {
|
|
@@ -5227,7 +5226,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
// }
|
|
|
ModuleTy =
|
|
|
llvm::StructType::create("struct._objc_module",
|
|
|
- LongTy, LongTy, Int8PtrTy, SymtabPtrTy, NULL);
|
|
|
+ LongTy, LongTy, Int8PtrTy, SymtabPtrTy, nullptr);
|
|
|
|
|
|
|
|
|
// FIXME: This is the size of the setjmp buffer and should be target
|
|
@@ -5240,7 +5239,7 @@ ObjCTypesHelper::ObjCTypesHelper(CodeGen::CodeGenModule &cgm)
|
|
|
ExceptionDataTy =
|
|
|
llvm::StructType::create("struct._objc_exception_data",
|
|
|
llvm::ArrayType::get(CGM.Int32Ty,SetJmpBufferSize),
|
|
|
- StackPtrTy, NULL);
|
|
|
+ StackPtrTy, nullptr);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -5253,7 +5252,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
// }
|
|
|
MethodListnfABITy =
|
|
|
llvm::StructType::create("struct.__method_list_t", IntTy, IntTy,
|
|
|
- llvm::ArrayType::get(MethodTy, 0), NULL);
|
|
|
+ llvm::ArrayType::get(MethodTy, 0), nullptr);
|
|
|
// struct method_list_t *
|
|
|
MethodListnfABIPtrTy = llvm::PointerType::getUnqual(MethodListnfABITy);
|
|
|
|
|
@@ -5281,7 +5280,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
MethodListnfABIPtrTy, MethodListnfABIPtrTy,
|
|
|
MethodListnfABIPtrTy, MethodListnfABIPtrTy,
|
|
|
PropertyListPtrTy, IntTy, IntTy, Int8PtrPtrTy,
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// struct _protocol_t*
|
|
|
ProtocolnfABIPtrTy = llvm::PointerType::getUnqual(ProtocolnfABITy);
|
|
@@ -5292,7 +5291,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
// }
|
|
|
ProtocolListnfABITy->setBody(LongTy,
|
|
|
llvm::ArrayType::get(ProtocolnfABIPtrTy, 0),
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// struct _objc_protocol_list*
|
|
|
ProtocolListnfABIPtrTy = llvm::PointerType::getUnqual(ProtocolListnfABITy);
|
|
@@ -5306,7 +5305,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
// }
|
|
|
IvarnfABITy = llvm::StructType::create(
|
|
|
"struct._ivar_t", llvm::PointerType::getUnqual(IvarOffsetVarTy),
|
|
|
- Int8PtrTy, Int8PtrTy, IntTy, IntTy, NULL);
|
|
|
+ Int8PtrTy, Int8PtrTy, IntTy, IntTy, nullptr);
|
|
|
|
|
|
// struct _ivar_list_t {
|
|
|
// uint32 entsize; // sizeof(struct _ivar_t)
|
|
@@ -5315,7 +5314,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
// }
|
|
|
IvarListnfABITy =
|
|
|
llvm::StructType::create("struct._ivar_list_t", IntTy, IntTy,
|
|
|
- llvm::ArrayType::get(IvarnfABITy, 0), NULL);
|
|
|
+ llvm::ArrayType::get(IvarnfABITy, 0), nullptr);
|
|
|
|
|
|
IvarListnfABIPtrTy = llvm::PointerType::getUnqual(IvarListnfABITy);
|
|
|
|
|
@@ -5339,7 +5338,8 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
Int8PtrTy, MethodListnfABIPtrTy,
|
|
|
ProtocolListnfABIPtrTy,
|
|
|
IvarListnfABIPtrTy,
|
|
|
- Int8PtrTy, PropertyListPtrTy, NULL);
|
|
|
+ Int8PtrTy, PropertyListPtrTy,
|
|
|
+ nullptr);
|
|
|
|
|
|
// ImpnfABITy - LLVM for id (*)(id, SEL, ...)
|
|
|
llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy };
|
|
@@ -5360,7 +5360,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
CachePtrTy,
|
|
|
llvm::PointerType::getUnqual(ImpnfABITy),
|
|
|
llvm::PointerType::getUnqual(ClassRonfABITy),
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// LLVM for struct _class_t *
|
|
|
ClassnfABIPtrTy = llvm::PointerType::getUnqual(ClassnfABITy);
|
|
@@ -5379,7 +5379,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
MethodListnfABIPtrTy,
|
|
|
ProtocolListnfABIPtrTy,
|
|
|
PropertyListPtrTy,
|
|
|
- NULL);
|
|
|
+ nullptr);
|
|
|
|
|
|
// New types for nonfragile abi messaging.
|
|
|
CodeGen::CodeGenTypes &Types = CGM.getTypes();
|
|
@@ -5418,7 +5418,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
// };
|
|
|
SuperMessageRefTy =
|
|
|
llvm::StructType::create("struct._super_message_ref_t",
|
|
|
- ImpnfABITy, SelectorPtrTy, NULL);
|
|
|
+ ImpnfABITy, SelectorPtrTy, nullptr);
|
|
|
|
|
|
// SuperMessageRefPtrTy - LLVM for struct _super_message_ref_t*
|
|
|
SuperMessageRefPtrTy = llvm::PointerType::getUnqual(SuperMessageRefTy);
|
|
@@ -5432,7 +5432,7 @@ ObjCNonFragileABITypesHelper::ObjCNonFragileABITypesHelper(CodeGen::CodeGenModul
|
|
|
EHTypeTy =
|
|
|
llvm::StructType::create("struct._objc_typeinfo",
|
|
|
llvm::PointerType::getUnqual(Int8PtrTy),
|
|
|
- Int8PtrTy, ClassnfABIPtrTy, NULL);
|
|
|
+ Int8PtrTy, ClassnfABIPtrTy, nullptr);
|
|
|
EHTypePtrTy = llvm::PointerType::getUnqual(EHTypeTy);
|
|
|
}
|
|
|
|