summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-02-23 22:00:30 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-02-23 22:00:30 +0000
commitc18086ae175568e13161cd7502a8953b5effa5d3 (patch)
tree4c606aba2e46f52a72a2f788afcf34efc3816880 /clang/lib/CodeGen/CodeGenModule.cpp
parentda52f449a06f568bd76c5c8ad89862d0b525cd6c (diff)
downloadbcm5719-llvm-c18086ae175568e13161cd7502a8953b5effa5d3.tar.gz
bcm5719-llvm-c18086ae175568e13161cd7502a8953b5effa5d3.zip
Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.
llvm-svn: 96992
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index f819382a936..52366190881 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1327,6 +1327,7 @@ void CodeGenModule::EmitAliasDefinition(const ValueDecl *D) {
GA->setLinkage(llvm::Function::DLLExportLinkage);
}
} else if (D->hasAttr<WeakAttr>() ||
+ D->hasAttr<WeakRefAttr>() ||
D->hasAttr<WeakImportAttr>()) {
GA->setLinkage(llvm::Function::WeakAnyLinkage);
}
OpenPOWER on IntegriCloud