[cfe-commits] r65762 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Daniel Dunbar daniel at zuster.org
Sat Feb 28 20:51:19 PST 2009


Author: ddunbar
Date: Sat Feb 28 22:51:18 2009
New Revision: 65762

URL: http://llvm.org/viewvc/llvm-project?rev=65762&view=rev
Log:
Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.

Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=65762&r1=65761&r2=65762&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Feb 28 22:51:18 2009
@@ -4565,18 +4565,7 @@
     return Builder.CreateLoad(Entry, false, "tmp");
   
   std::string MetaClassName("\01_OBJC_METACLASS_$_" + ID->getNameAsString());
-  llvm::GlobalVariable *MetaClassGV = 
-    CGM.getModule().getGlobalVariable(MetaClassName);
-  if (!MetaClassGV) {
-    MetaClassGV =
-      new llvm::GlobalVariable(ObjCTypes.ClassnfABITy, false,
-                               llvm::GlobalValue::ExternalLinkage,
-                               0,
-                               MetaClassName,
-                               &CGM.getModule());
-      UsedGlobals.push_back(MetaClassGV);
-  }
-
+  llvm::GlobalVariable *MetaClassGV = GetClassGlobal(MetaClassName);
   Entry = 
     new llvm::GlobalVariable(ObjCTypes.ClassnfABIPtrTy, false,
                              llvm::GlobalValue::InternalLinkage,





More information about the cfe-commits mailing list