From 208ff5e8a073de2a5d15cbe03cab8a4c0d935e28 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 11 Aug 2008 18:12:00 +0000 Subject: 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 --- lib/CodeGen/CGExprScalar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') 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(); } //===--------------------------------------------------------------------===// -- cgit v1.2.3-70-g09d2