[PATCH] D110281: Change __builtin_sycl_unique_stable_name to just use an Itanium mangling

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 22 12:33:45 PDT 2021


erichkeane created this revision.
erichkeane added reviewers: aaron.ballman, rjmccall.
Herald added subscribers: Naghasan, Anastasia, ebevhan, mgrang, yaxunl.
erichkeane requested review of this revision.

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.


https://reviews.llvm.org/D110281

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110281.374322.patch
Type: text/x-patch
Size: 30539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210922/3054767c/attachment-0001.bin>


More information about the cfe-commits mailing list