llvm-project/clang/tools
Erich Keane eba69b59d1 Reimplement __builtin_unique_stable_name-
The original version of this was reverted, and @rjmcall provided some
advice to architect a new solution.  This is that solution.

This implements a builtin to provide a unique name that is stable across
compilations of this TU for the purposes of implementing the library
component of the unnamed kernel feature of SYCL.  It does this by
running the Itanium mangler with a few modifications.

Because it is somewhat common to wrap non-kernel-related lambdas in
macros that aren't present on the device (such as for logging), this
uniquely generates an ID for all lambdas involved in the naming of a
kernel. It uses the lambda-mangling number to do this, except replaces
this with its own number (starting at 10000 for readabililty reasons)
for lambdas used to name a kernel.

Additionally, this implements itself as constexpr with a slight catch:
if a name would be invalidated by the use of this lambda in a later
kernel invocation, it is diagnosed as an error (see the Sema tests).

Differential Revision: https://reviews.llvm.org/D103112
2021-05-27 07:12:20 -07:00
..
amdgpu-arch [amdgpu-arch] Guard hsa.h with __has_include 2021-05-10 07:33:30 +00:00
apinotes-test [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
arcmt-test [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
c-arcmt-test
c-index-test [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
clang-check [clang-check] Add tokens-dump in clang-check. 2021-02-11 09:40:47 +01:00
clang-diff clang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC 2020-10-15 00:35:16 -04:00
clang-extdef-mapping [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-format [git-clang-format] Do not apply clang-format to symlinks 2021-05-11 10:34:40 -07:00
clang-format-vs clang-format-vs : Fix Unicode formatting 2019-11-27 09:58:59 +01:00
clang-fuzzer [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref 2020-11-21 21:04:12 -08:00
clang-import-test Fixup for 8c86197de3 to avoid making it platform-dependent 2020-12-11 17:34:00 -08:00
clang-offload-bundler [clang-offload-bundler] Delimit input/output file names by '--' for llvm-objcopy 2021-05-19 20:25:05 -07:00
clang-offload-wrapper [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
clang-refactor [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
clang-rename [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
clang-repl [clang-repl] Add final set of missing library dependencies. 2021-05-13 08:06:58 +00:00
clang-scan-deps [clang][deps] NFC: Fix typo 2021-04-26 10:55:24 +02:00
clang-shlib [CMake][ELF] Link libLLVM.so and libclang-cpp.so with -Bsymbolic-functions 2021-05-13 13:44:57 -07:00
diag-build
diagtool Recommit "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions" 2020-10-19 17:48:04 -04:00
driver [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
libclang Reimplement __builtin_unique_stable_name- 2021-05-27 07:12:20 -07:00
scan-build Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
scan-build-py [scan-build-py] Add sarif-html support in scan-build-py 2021-02-23 14:41:48 -08:00
scan-view Partially Revert "scan-view: Remove Reporter.py and associated AppleScript files" 2021-02-11 19:10:46 -08:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00