diff options
| author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2022-04-26 13:06:53 -0400 |
|---|---|---|
| committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2022-04-26 20:43:39 -0400 |
| commit | 57a210e5b705f4d176facbd8a15aa3e89ea9e335 (patch) | |
| tree | e229c9ac2d3d9227b3b0f3d251696b4f89013bb0 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 0274811b5a83580aaded752757a98ec0363f6113 (diff) | |
[CUDA][HIP] Fix linkage of __clang_gpu_used_external
Different TU's may have this globl var. appending linkage can
only be used with lld recognized special variables.
Change it to internal linkage.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D124466
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 784f2d0e578f..83f650cb8161 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -598,7 +598,7 @@ void CodeGenModule::Release() { llvm::ArrayType *ATy = llvm::ArrayType::get(Int8PtrTy, UsedArray.size()); auto *GV = new llvm::GlobalVariable( - getModule(), ATy, false, llvm::GlobalValue::AppendingLinkage, + getModule(), ATy, false, llvm::GlobalValue::InternalLinkage, llvm::ConstantArray::get(ATy, UsedArray), "__clang_gpu_used_external"); addCompilerUsedGlobal(GV); } |
