]> granicus.if.org Git - clang/commitdiff
Fix compilation warning with help from David Chisnall.
authorMike Stump <mrs@apple.com>
Mon, 11 Aug 2008 23:16:18 +0000 (23:16 +0000)
committerMike Stump <mrs@apple.com>
Mon, 11 Aug 2008 23:16:18 +0000 (23:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54654 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index fb873c2a67b4494e11996d88925eff3ec3f53342..633b7b8dad71957cf8948b03afd0db682fd23dcf 100644 (file)
@@ -331,10 +331,13 @@ void CodeGenModule::EmitObjCClassImplementation(
   // this should probably be something different (size just of instance
   // varaibles in this class, not superclasses?).
   int instanceSize = 0;
-  const llvm::Type *ObjTy;
+  const llvm::Type *ObjTy = 0;
   if (!Runtime->LateBoundIVars()) {
     ObjTy = getTypes().ConvertType(Context.getObjCInterfaceType(ClassDecl));
     instanceSize = TheTargetData.getABITypeSize(ObjTy);
+  } else {
+    // This is required by newer ObjC runtimes.
+    assert(0 && "Late-bound instance variables not yet supported");
   }
 
   // Collect information about instance variables.