]> granicus.if.org Git - clang/commit
[HIP] Make __hip_gpubin_handle hidden to avoid being merged across different shared...
authorYaxun Liu <Yaxun.Liu@amd.com>
Fri, 17 Aug 2018 17:47:31 +0000 (17:47 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Fri, 17 Aug 2018 17:47:31 +0000 (17:47 +0000)
commitc912e867c02ee427d751d7636fa3158a432fb8f2
tree0922c5fd5c2905bc9163a9e7e0935382b77ce2ff
parent9e45fbd56cdcc6c62a276b5838878cc65dee4831
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340056 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu