aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2011-03-22 21:21:24 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2011-03-22 21:21:24 +0000
commit60be607e5d71627bf3dab8f51c3fdca74267c692 (patch)
treeded2333d1d82d2c0b91f08b7c6163037e27dfb9a /lib/CodeGen/CodeGenModule.cpp
parent4ee9926671913ea6189ef9840a244d7c4385a7d5 (diff)
Simplify Mac runtime selection - it's the factory function's job to select which class to produce, not CodeGenModule's.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index a528d2ede7..7eee83c928 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -72,14 +72,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
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)
@@ -115,8 +109,6 @@ CodeGenModule::~CodeGenModule() {
void CodeGenModule::createObjCRuntime() {
if (!Features.NeXTRuntime)
Runtime = CreateGNUObjCRuntime(*this);
- else if (Features.ObjCNonFragileABI)
- Runtime = CreateMacNonFragileABIObjCRuntime(*this);
else
Runtime = CreateMacObjCRuntime(*this);
}