diff options
| author | Jonas Hahnfeld <jonas.hahnfeld@cern.ch> | 2021-08-20 13:28:37 +0200 |
|---|---|---|
| committer | Jonas Hahnfeld <jonas.hahnfeld@cern.ch> | 2021-08-25 09:31:22 +0200 |
| commit | ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83 (patch) | |
| tree | 60bd75ba846d63d70c8c3d41dbd18cf8951de77f /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 5fc4828aa6c6df03bd98b1f066e85655383d0cce (diff) | |
[CUDA] Fix static device variables with -fgpu-rdc
NVPTX does not allow dots in the identifier, so ptxas errors out with
fatal : Parsing error near '.static': syntax error
because it parses .static as a directive. Avoid this problem by using
two underscores, similar to what OpenMP does for outlined functions.
Differential Revision: https://reviews.llvm.org/D108456
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 13d7cce880e0..0940980461cd 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -6444,5 +6444,5 @@ bool CodeGenModule::stopAutoInit() { void CodeGenModule::printPostfixForExternalizedStaticVar( llvm::raw_ostream &OS) const { - OS << ".static." << getContext().getCUIDHash(); + OS << "__static__" << getContext().getCUIDHash(); } |
