]> granicus.if.org Git - clang/commitdiff
Fix incorrect linkage specifiers for selectors.
authorDavid Chisnall <csdavec@swan.ac.uk>
Mon, 14 Mar 2011 15:01:16 +0000 (15:01 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Mon, 14 Mar 2011 15:01:16 +0000 (15:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127580 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index 5f19dc6e5647c083b66ca14ae5eda7a1634c64e1..5bd45a01c4beb93235cedeba1f38a264b6d8b362 100644 (file)
@@ -1720,7 +1720,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
     llvm::Constant *Idxs[] = {Zeros[0],
       llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), index++), Zeros[0]};
     llvm::Constant *SelPtr = new llvm::GlobalVariable(TheModule, SelStructPtrTy,
-      true, llvm::GlobalValue::LinkOnceODRLinkage,
+      true, llvm::GlobalValue::InternalLinkage,
       llvm::ConstantExpr::getGetElementPtr(SelectorList, Idxs, 2),
       MangleSelectorTypes(".objc_sel_ptr"+iter->first.first+"."+
          iter->first.second));
@@ -1739,7 +1739,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
     llvm::Constant *Idxs[] = {Zeros[0],
       llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), index++), Zeros[0]};
     llvm::Constant *SelPtr = new llvm::GlobalVariable(TheModule, SelStructPtrTy,
-      true, llvm::GlobalValue::LinkOnceODRLinkage,
+      true, llvm::GlobalValue::InternalLinkage,
       llvm::ConstantExpr::getGetElementPtr(SelectorList, Idxs, 2),
       MangleSelectorTypes(std::string(".objc_sel_ptr")+iter->getKey().str()));
     // If selectors are defined as an opaque type, cast the pointer to this