Skip to content

Commit ea2d38d

Browse files
committed
[SYCL][Graph] Fix switch statement for Clang build
After the merge of intel#10789 post-commit CI is failing on clang builds: * [MacOS build](https://github.com/intel/llvm/actions/runs/5935599091/job/16094354219) * [Linux build](https://github.com/intel/llvm/actions/runs/5935599091/job/16094354500) ``` /Users/runner/work/llvm/llvm/build/include/sycl/ext/oneapi/experimental/graph.hpp:67:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default] default: ``` Fixed by removing the default label from the `switch`, and replacing with an assert `false` afterwards, which seems consistent with other places in the sycl runtime. I haven't done a clang build yet to verify this fix.
1 parent 8d8d3f4 commit ea2d38d

File tree

1 file changed

+3
-2
lines changed
  • sycl/include/sycl/ext/oneapi/experimental

1 file changed

+3
-2
lines changed

sycl/include/sycl/ext/oneapi/experimental/graph.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ UnsupportedFeatureToString(UnsupportedGraphFeatures Feature) {
6464
return "sycl_ext_oneapi_device_global";
6565
case UGF::sycl_ext_oneapi_bindless_images:
6666
return "sycl_ext_oneapi_bindless_images";
67-
default:
68-
return {};
6967
}
68+
69+
assert(false && "Unhandled graphs feature");
70+
return {};
7071
}
7172

7273
class node_impl;

0 commit comments

Comments
 (0)