diff options
author | Mike Stump <mrs@apple.com> | 2009-03-07 16:33:28 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-07 16:33:28 +0000 |
commit | a6ca334389b35fe81b1ebd26f3f799f9130e16b2 (patch) | |
tree | e9f6288f5a2aae152f2c6265642caa460c6223b9 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | de373a033f87424f82095e8fe9c5ff65a07a9d46 (diff) | |
download | bcm5719-llvm-a6ca334389b35fe81b1ebd26f3f799f9130e16b2.tar.gz bcm5719-llvm-a6ca334389b35fe81b1ebd26f3f799f9130e16b2.zip |
Fixup our uses of various linkages to match how llvm now works. I think they are all
correct, but an extra set of ObjC eyes would be good.
llvm-svn: 66342
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 85d5208d49a..95d881bc49a 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -270,7 +270,7 @@ void CodeGenModule::SetGlobalValueAttributes(const Decl *D, D->getAttr<WeakImportAttr>()) { // "extern_weak" is overloaded in LLVM; we probably should have // separate linkage types for this. - GV->setLinkage(llvm::Function::ExternalWeakLinkage); + GV->setLinkage(llvm::Function::ExternalWeakAnyLinkage); } } else { if (IsInternal) { @@ -285,7 +285,7 @@ void CodeGenModule::SetGlobalValueAttributes(const Decl *D, GV->setLinkage(llvm::Function::DLLExportLinkage); } else if (D->getAttr<WeakAttr>() || D->getAttr<WeakImportAttr>() || IsInline) - GV->setLinkage(llvm::Function::WeakLinkage); + GV->setLinkage(llvm::Function::WeakAnyLinkage); } } @@ -611,7 +611,7 @@ void CodeGenModule::EmitGlobalDefinition(const ValueDecl *D) { setGlobalVisibility(GV, VisibilityAttr::HiddenVisibility); if (D->getAttr<WeakAttr>() || D->getAttr<WeakImportAttr>()) - GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); + GV->setLinkage(llvm::GlobalValue::ExternalWeakAnyLinkage); if (const AsmLabelAttr *ALA = D->getAttr<AsmLabelAttr>()) { // Prefaced with special LLVM marker to indicate that the name @@ -746,7 +746,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { else if (D->getAttr<DLLExportAttr>()) GV->setLinkage(llvm::Function::DLLExportLinkage); else if (D->getAttr<WeakAttr>() || D->getAttr<WeakImportAttr>()) - GV->setLinkage(llvm::GlobalVariable::WeakLinkage); + GV->setLinkage(llvm::GlobalVariable::WeakAnyLinkage); else { // FIXME: This isn't right. This should handle common linkage and other // stuff. @@ -757,7 +757,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { assert(0 && "Can't have auto or register globals"); case VarDecl::None: if (!D->getInit()) - GV->setLinkage(llvm::GlobalVariable::CommonLinkage); + GV->setLinkage(llvm::GlobalVariable::CommonAnyLinkage); else GV->setLinkage(llvm::GlobalVariable::ExternalLinkage); break; |