Fix incorrect linkage specifiers for selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall 2011-03-14 15:01:16 +00:00
Родитель 6656457a0a
Коммит b2eb86ff8a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

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