summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCUDA
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2018-08-17 17:47:31 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2018-08-17 17:47:31 +0000
commit94ff57f5b182e7978dce94d83310ecfac2445abb (patch)
tree61d55fe5c955a053cb55d815575982a727611e77 /clang/test/CodeGenCUDA
parent2784a339abc5537326a15613bd2de40a577d5ccf (diff)
downloadbcm5719-llvm-94ff57f5b182e7978dce94d83310ecfac2445abb.tar.gz
bcm5719-llvm-94ff57f5b182e7978dce94d83310ecfac2445abb.zip
[HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared libraries
Different shared libraries contain different fat binary, which is stored in a global variable __hip_gpubin_handle. Since different compilation units share the same fat binary, this variable has linkonce linkage. However, it should not be merged across different shared libraries. This patch set the visibility of the global variable to be hidden, which will make it invisible in the shared library, therefore preventing it from being merged. Differential Revision: https://reviews.llvm.org/D50596 llvm-svn: 340056
Diffstat (limited to 'clang/test/CodeGenCUDA')
-rw-r--r--clang/test/CodeGenCUDA/device-stub.cu2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCUDA/device-stub.cu b/clang/test/CodeGenCUDA/device-stub.cu
index 716381b7a82..06877da8588 100644
--- a/clang/test/CodeGenCUDA/device-stub.cu
+++ b/clang/test/CodeGenCUDA/device-stub.cu
@@ -80,7 +80,7 @@ void use_pointers() {
// HIP-SAME: section ".hipFatBinSegment"
// * variable to save GPU binary handle after initialization
// CUDANORDC: @__[[PREFIX]]_gpubin_handle = internal global i8** null
-// HIP: @__[[PREFIX]]_gpubin_handle = linkonce global i8** null
+// HIP: @__[[PREFIX]]_gpubin_handle = linkonce hidden global i8** null
// * constant unnamed string with NVModuleID
// RDC: [[MODULE_ID_GLOBAL:@.*]] = private constant
// CUDARDC-SAME: c"[[MODULE_ID:.+]]\00", section "__nv_module_id", align 32
OpenPOWER on IntegriCloud