[SYCL] Fix __builtin_sycl_unique_stable_name to work on windows/spir
authorErich Keane <erich.keane@intel.com>
Wed, 2 Jun 2021 19:50:52 +0000 (12:50 -0700)
committerErich Keane <erich.keane@intel.com>
Wed, 2 Jun 2021 20:16:14 +0000 (13:16 -0700)
commitd8e0ae9a76a62bdc6117630d59bf9967ac9bb4ea
tree61c04ddf623fccdcc3afe8552788e5278d8be252
parent344e919b1a33cd69fe023cbe5a49bbdf4f5ea037
[SYCL] Fix __builtin_sycl_unique_stable_name to work on windows/spir

In the case where the device is an itanium target, and the host is a
windows target, we were getting the names wrong, since in the itanium
case we filter by lambda-signature.

The fix is to always filter by the signature rather than just on
non-windows builds. I considered doing the reverse (that is, checking
the aux-triple), but doing so would result in duplicate lambda mangling
numbers (from linux reusing the same number for different signatures).
clang/lib/AST/ASTContext.cpp
clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp [new file with mode: 0644]