From: Daniel Dunbar Date: Sun, 1 Mar 2009 04:51:18 +0000 (+0000) Subject: Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8def799ef5b006d4a28f9466e4637a90dcab2b0d;p=clang Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index fdb739495e..71580dd30a 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -4565,18 +4565,7 @@ llvm::Value *CGObjCNonFragileABIMac::EmitMetaClassRef(CGBuilderTy &Builder, 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,