[PATCH] D124466: [CUDA][HIP] Fix linkage of __clang_gpu_used_external
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 26 17:44:11 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG57a210e5b705: [CUDA][HIP] Fix linkage of __clang_gpu_used_external (authored by yaxunl).
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124466/new/
https://reviews.llvm.org/D124466
Files:
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCUDA/host-used-extern.cu
Index: clang/test/CodeGenCUDA/host-used-extern.cu
===================================================================
--- clang/test/CodeGenCUDA/host-used-extern.cu
+++ clang/test/CodeGenCUDA/host-used-extern.cu
@@ -11,7 +11,7 @@
#include "Inputs/cuda.h"
-// CHECK-LABEL: @__clang_gpu_used_external = appending {{.*}}global
+// CHECK-LABEL: @__clang_gpu_used_external = internal {{.*}}global
// CHECK-DAG: @_Z7kernel1v
// CHECK-DAG: @_Z7kernel4v
// CHECK-DAG: @var1
Index: clang/lib/CodeGen/CodeGenModule.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -598,7 +598,7 @@
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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124466.425371.patch
Type: text/x-patch
Size: 1067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220427/d9dc428e/attachment.bin>
More information about the cfe-commits
mailing list