CodeGen::CGObjCRuntime *
CodeGen::CreateMacObjCRuntime(CodeGen::CodeGenModule &CGM) {
+ if (CGM.getLangOptions().ObjCNonFragileABI)
+ return new CGObjCNonFragileABIMac(CGM);
return new CGObjCMac(CGM);
}
-
-CodeGen::CGObjCRuntime *
-CodeGen::CreateMacNonFragileABIObjCRuntime(CodeGen::CodeGenModule &CGM) {
- return new CGObjCNonFragileABIMac(CGM);
-}
//TODO: This should include some way of selecting which runtime to target.
CGObjCRuntime *CreateGNUObjCRuntime(CodeGenModule &CGM);
CGObjCRuntime *CreateMacObjCRuntime(CodeGenModule &CGM);
-CGObjCRuntime *CreateMacNonFragileABIObjCRuntime(CodeGenModule &CGM);
}
}
#endif
BlockObjectAssignDecl(0), BlockObjectDisposeDecl(0),
BlockObjectAssign(0), BlockObjectDispose(0),
BlockDescriptorType(0), GenericBlockLiteralType(0) {
- if (!Features.ObjC1)
- Runtime = 0;
- else if (!Features.NeXTRuntime)
- Runtime = CreateGNUObjCRuntime(*this);
- else if (Features.ObjCNonFragileABI)
- Runtime = CreateMacNonFragileABIObjCRuntime(*this);
- else
- Runtime = CreateMacObjCRuntime(*this);
+ if (Features.ObjC1)
+ createObjCRuntime();
// Enable TBAA unless it's suppressed.
if (!CodeGenOpts.RelaxedAliasing && CodeGenOpts.OptimizationLevel > 0)
void CodeGenModule::createObjCRuntime() {
if (!Features.NeXTRuntime)
Runtime = CreateGNUObjCRuntime(*this);
- else if (Features.ObjCNonFragileABI)
- Runtime = CreateMacNonFragileABIObjCRuntime(*this);
else
Runtime = CreateMacObjCRuntime(*this);
}