summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2022-04-18 11:08:50 -0400
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2022-04-18 23:10:31 -0400
commitcac4e2fe258239489c12dd5f153da3e69e17ebba (patch)
treeb7ae5e579a39c8a84b317afe53c4b0bd940ce1cb /clang/lib/CodeGen/CodeGenModule.cpp
parent80787213eae2308c1015eb90e80cf78b9344e457 (diff)
[CUDA][HIP] Fix gpu.used.external
Rename gpu.used.external as __clang_gpu_used_external as ptxas does not allow . in global variable name. Fixes: https://github.com/llvm/llvm-project/issues/54934 Reviewed by: Joseph Huber, Artem Belevich Differential Revision: https://reviews.llvm.org/D123946
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index bf5f2d1b4271..9f6e2e5a9f52 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -599,7 +599,7 @@ void CodeGenModule::Release() {
auto *GV = new llvm::GlobalVariable(
getModule(), ATy, false, llvm::GlobalValue::AppendingLinkage,
- llvm::ConstantArray::get(ATy, UsedArray), "gpu.used.external");
+ llvm::ConstantArray::get(ATy, UsedArray), "__clang_gpu_used_external");
addCompilerUsedGlobal(GV);
}