Skip to content

Commit

Permalink
[SYCL] Add missing includes in SYCL stubs for C++ standard headers.
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Lazarev <vladimir.lazarev@intel.com>
  • Loading branch information
vladimirlaz committed Jan 22, 2019
1 parent 58a7b24 commit eae0f80
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/lib/Headers/sycl_wrappers/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//===----------------------------------------------------------------------===//

#include <initializer_list>
#include <iterator>

namespace std {

Expand Down
3 changes: 3 additions & 0 deletions clang/lib/Headers/sycl_wrappers/random
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
//===----------------------------------------------------------------------===//

#include <initializer_list>
#include <iostream>
#include <limits>
#include <vector>

namespace std {

Expand Down
12 changes: 12 additions & 0 deletions clang/test/CodeGenSYCL/inlining.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// RUN: %clang --sycl %s -S -emit-llvm -o - | FileCheck %s

template <typename name, typename Func>
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
kernelFunc();
}

int main() {
// CHECK-NOT: noinline
kernel_single_task<class kernel_function>([]() {});
return 0;
}

0 comments on commit eae0f80

Please sign in to comment.