diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 18:12:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-11 18:12:00 +0000 |
commit | 208ff5e8a073de2a5d15cbe03cab8a4c0d935e28 (patch) | |
tree | abbaf176368be1bd64b39dc63779a22331eccab0 /lib/CodeGen/CGExprScalar.cpp | |
parent | 6379a7a15335e0af543a942efe9cfd514a83dab8 (diff) |
Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
- Added CodeGenModule::hasObjCRuntime predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 63b8efc5dc..2bd39c1bd6 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -49,7 +49,9 @@ public: ScalarExprEmitter(CodeGenFunction &cgf) : CGF(cgf), Builder(CGF.Builder), - Runtime(CGF.CGM.getObjCRuntime()) { + Runtime(0) { + if (CGF.CGM.hasObjCRuntime()) + Runtime = &CGF.CGM.getObjCRuntime(); } //===--------------------------------------------------------------------===// |