Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7056,7 +7056,11 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
for (unsigned I = 0; I < KernelDescs.size(); I++) {
O << KernelDescs[I].Params.size() << ", ";
}
// Add a sentinel to avoid warning if the collection is empty
// (similar to what we do for kernel_signatures below).
O << "0, \n";
O << "};\n\n";

O << "// array representing signatures of all kernels defined in the\n";
O << "// corresponding source\n";
O << "static constexpr\n";
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/int-header-empty-signatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {0, 0

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/integration_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };
//
// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {5, 3, 2, 8, 3, 0, 0,
//
// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {2, 0,

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {2, 0,

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {1, 1, 1, 0,

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/union-kernel-param-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {1, 0,

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/wrapped-accessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// CHECK-NEXT: ""
// CHECK-NEXT: };

// CHECK: static constexpr unsigned kernel_args_sizes[] = {
// CHECK: static constexpr unsigned kernel_args_sizes[] = {1, 0,

// CHECK: static constexpr
// CHECK-NEXT: const kernel_param_desc_t kernel_signatures[] = {
Expand Down