Skip to content

Commit dab2cc8

Browse files
authored
[SYCL][Graph] Fix switch statement for Clang build (#10923)
After the merge of #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.
1 parent 465aa56 commit dab2cc8

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enum class UnsupportedGraphFeatures {
4444
sycl_ext_oneapi_bindless_images = 7
4545
};
4646

47-
constexpr const char *
47+
inline const char *
4848
UnsupportedFeatureToString(UnsupportedGraphFeatures Feature) {
4949
using UGF = UnsupportedGraphFeatures;
5050
switch (Feature) {
@@ -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)