diff --git a/clang/lib/Headers/sycl_wrappers/algorithm b/clang/lib/Headers/sycl_wrappers/algorithm index 35e9457ab1531..94375c9b3979c 100644 --- a/clang/lib/Headers/sycl_wrappers/algorithm +++ b/clang/lib/Headers/sycl_wrappers/algorithm @@ -9,6 +9,7 @@ //===----------------------------------------------------------------------===// #include +#include namespace std { diff --git a/clang/lib/Headers/sycl_wrappers/random b/clang/lib/Headers/sycl_wrappers/random index 373bcc07fe6e3..b03602c8a68ca 100644 --- a/clang/lib/Headers/sycl_wrappers/random +++ b/clang/lib/Headers/sycl_wrappers/random @@ -9,6 +9,9 @@ //===----------------------------------------------------------------------===// #include +#include +#include +#include namespace std { diff --git a/clang/test/CodeGenSYCL/inlining.cpp b/clang/test/CodeGenSYCL/inlining.cpp new file mode 100644 index 0000000000000..de4ac2d015ad0 --- /dev/null +++ b/clang/test/CodeGenSYCL/inlining.cpp @@ -0,0 +1,12 @@ +// RUN: %clang --sycl %s -S -emit-llvm -o - | FileCheck %s + +template +__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) { + kernelFunc(); +} + +int main() { + // CHECK-NOT: noinline + kernel_single_task([]() {}); + return 0; +}