aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2022-04-07 22:57:56 -0400
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2022-04-10 21:56:28 -0400
commit4ea1d435099f992cc16127619b0feb64e070630d (patch)
tree92cb58efa87516e44eeae38ddc106a7def55f1eb /clang/lib/CodeGen/CodeGenModule.h
parenta91c77ee2858263efa789c05e7b82d3c0af9d314 (diff)
downloadllvm-4ea1d435099f992cc16127619b0feb64e070630d.zip
llvm-4ea1d435099f992cc16127619b0feb64e070630d.tar.gz
llvm-4ea1d435099f992cc16127619b0feb64e070630d.tar.bz2
[CUDA][HIP] Externalize kernels in anonymous name space
kernels in anonymous name space needs to have unique name to avoid duplicate symbols. Fixes: https://github.com/llvm/llvm-project/issues/54560 Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D123353
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index b6166a7..1ba592ba 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1457,9 +1457,10 @@ public:
TBAAAccessInfo *TBAAInfo = nullptr);
bool stopAutoInit();
- /// Print the postfix for externalized static variable for single source
- /// offloading languages CUDA and HIP.
- void printPostfixForExternalizedStaticVar(llvm::raw_ostream &OS) const;
+ /// Print the postfix for externalized static variable or kernels for single
+ /// source offloading languages CUDA and HIP.
+ void printPostfixForExternalizedDecl(llvm::raw_ostream &OS,
+ const Decl *D) const;
private:
llvm::Constant *GetOrCreateLLVMFunction(