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
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 68878a2..89f5522 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -744,7 +744,7 @@
   // a class without recompiling all of the subclasses.  If this is the case
   // then the CGObjCRuntime subclass must return true to LateBoundIvars and
   // implement the lookup itself.
-  if (CGM.getObjCRuntime()->LateBoundIVars()) {
+  if (CGM.getObjCRuntime().LateBoundIVars()) {
     assert(0 && "FIXME: Implement support for late-bound instance variables");
     return LValue(); // Not reached.
   }