Change __builtin_sycl_unique_stable_name to just use an Itanium mangling
authorErich Keane <erich.keane@intel.com>
Wed, 22 Sep 2021 19:24:53 +0000 (12:24 -0700)
committerErich Keane <erich.keane@intel.com>
Tue, 28 Sep 2021 13:41:03 +0000 (06:41 -0700)
commit9324cc2ca951fe5fe11c85470cb08e699c59499c
tree33bd55bef0abd450a76e5912a944fd4574755aba
parent72d991c42e185d3bf248d22fe25073fbf345529f
Change __builtin_sycl_unique_stable_name to just use an Itanium mangling

After significant problems in our downstream with the previous
implementation, the SYCL standard has opted to make using macros/etc to
change kernel-naming-lambdas in any way UB (even passively). As a
result, we are able to just emit the itanium mangling.

However, this DOES require a little work in the CXXABI, as the microsoft
and itanium mangler use different numbering schemes for lambdas.  This
patch adds a pair of mangling contexts that use the normal 'itanium'
mangling strategy to fill in the "DeviceManglingNumber" used previously
by CUDA.

Differential Revision: https://reviews.llvm.org/D110281
15 files changed:
clang/docs/LanguageExtensions.rst
clang/include/clang/AST/ASTContext.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/Sema.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Expr.cpp
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/ItaniumCXXABI.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/MicrosoftCXXABI.cpp
clang/lib/Sema/SemaSYCL.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/CodeGenSYCL/unique_stable_name.cpp
clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
clang/test/SemaSYCL/unique_stable_name.cpp