Issue |
150676
|
Summary |
[DirectX] Clean up to_underlying in case labels
|
Labels |
backend:DirectX
|
Assignees |
|
Reporter |
llvm-beanz
|
A bunch of switch statements have been added in the DirectX backend that operate over enums, but the input type is an integer instead of an enum. The switches are written with `llvm::to_underlying` as the case labels.
This pattern prevents switch-based compiler warnings to ensure that switch statements cover all appropriate cases. We should instead rewrite these switch statements to convert the integer to enumeration values (handling out-of-range possibility before the switch), then have the switch operate on the enum values themselves.
This pattern exists at the moment in:
* RootSignatureValidations.cpp
* DXContainerRootSignature.cpp
* DXContainerEmitter.cpp
* DXContainerYAML.cpp
* DXILRootSignature.cpp
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs