diff options
author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2022-03-30 10:33:03 -0400 |
---|---|---|
committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2022-04-28 19:54:43 -0400 |
commit | 11d3e31c60bdc9e491c51b97a964b6289575edfa (patch) | |
tree | e3a00cfb7a49399734b71544622bc13863ae8182 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 981ed72a17e4302dfd77ac54d742c08dfb6b35bb (diff) | |
download | llvm-11d3e31c60bdc9e491c51b97a964b6289575edfa.zip llvm-11d3e31c60bdc9e491c51b97a964b6289575edfa.tar.gz llvm-11d3e31c60bdc9e491c51b97a964b6289575edfa.tar.bz2 |
[CUDA][HIP] Fix mangling number for local struct
MSVC and Itanium mangling use different mangling numbers
for function-scope structs, which causes inconsistent
mangled kernel names in device and host compilations.
This patch uses Itanium mangling number for structs
in for mangling device side names in CUDA/HIP host
compilation on Windows to fix this issue.
A state is added to ASTContext to indicate whether the
current name mangling is for device side names in host
compilation. Device and host mangling number
are encoded/decoded as upper and lower half of 32 bit
unsigned integer to fit into the original mangling number
field for AST. Diagnostic will be emitted if a manglining
number exceeds limit.
Reviewed by: Artem Belevich, Reid Kleckner
Differential Revision: https://reviews.llvm.org/D122734
Fixes: SWDEV-328515
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions