[SYCL] Correct emission status reporting for function templates declared with SYCL attributes. (#185522) Commit cf6cc662eeee2b1416430f517850be9032788e39 ([OpenMP][SYCL] Improve diagnosing of unsupported types usage) customized `Sema::getEmissionStatus()` to return `Emitted` for a function declared with the `sycl_kernel` attribute during device compilation. That change is appropriate, but was inserted before a check for a dependent context and resulted in `Emitted` being returned instead of `TemplateDiscarded` for templated functions declared with the attribute. That appears to be incorrect; templated functions are still discarded. The customization was extended to include the `sycl_kernel_entry_point` and `sycl_external` attributes in commit 23e4fe040b67e2dd419652830a87093a93ea1a97 ([SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute). Those additions are appropriate, but the effect on templated functions (as opposed to their instantiations) resulted in the incorrect status being observed in a downstream fork of Clang. This change corrects `Sema::getEmissionStatus()` to once again unconditionally return `TemplateDiscarded` for templated functions.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.