diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2011-03-22 21:21:24 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2011-03-22 21:21:24 +0000 |
commit | 067f0ed468c979ea649c9e6ac979d973b424cff7 (patch) | |
tree | 6d0bbdd9766bbc92d8c7fbb4d5c753886f0ce309 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 26b57ffa270333d377b8cbe82ae7d76621293882 (diff) | |
download | llvm-067f0ed468c979ea649c9e6ac979d973b424cff7.zip llvm-067f0ed468c979ea649c9e6ac979d973b424cff7.tar.gz llvm-067f0ed468c979ea649c9e6ac979d973b424cff7.tar.bz2 |
Simplify Mac runtime selection - it's the factory function's job to select which class to produce, not CodeGenModule's.
llvm-svn: 128109
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a528d2e..7eee83c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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); } |