summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2014-06-27 18:35:56 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2014-06-27 18:35:56 +0000
commit2a8dc35cca8016d74c7b00e1b6958d02148b305c (patch)
tree7f49e5d7157486a2e4111e7bc0a80da25c491679 /lib
parentab7c0aa6626faeb1b34ea3db86cadad4e9ff0efd (diff)
downloadllvm-2a8dc35cca8016d74c7b00e1b6958d02148b305c.tar.gz
llvm-2a8dc35cca8016d74c7b00e1b6958d02148b305c.tar.bz2
llvm-2a8dc35cca8016d74c7b00e1b6958d02148b305c.tar.xz
[NVPTX] Emit .weak linkage for link_once, weak, available_externally, and common linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/NVPTX/NVPTXAsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 652a499556..a174949b99 100644
--- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1367,6 +1367,10 @@ void NVPTXAsmPrinter::printModuleLevelGV(const GlobalVariable *GVar,
O << ".visible ";
else
O << ".extern ";
+ } else if (GVar->hasLinkOnceLinkage() || GVar->hasWeakLinkage() ||
+ GVar->hasAvailableExternallyLinkage() ||
+ GVar->hasCommonLinkage()) {
+ O << ".weak ";
}
if (llvm::isTexture(*GVar)) {