summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2011-03-14 15:08:06 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2011-03-14 15:08:06 +0000
commit1d45faabc7d2eb00a2a2d23995a72989d099b78f (patch)
tree04077ef3c8d1311e2621fa0efef826a2c84c783a
parentRemove toy code from cmake script. (diff)
downloadllvm-project-1d45faabc7d2eb00a2a2d23995a72989d099b78f.tar.gz
llvm-project-1d45faabc7d2eb00a2a2d23995a72989d099b78f.tar.bz2
llvm-project-1d45faabc7d2eb00a2a2d23995a72989d099b78f.zip
Merged selector linkage fix (GNU runtime) from trunk. Approved by Doug Gregor.
llvm-svn: 127581
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 5f19dc6e5647..5bd45a01c4be 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -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