[llvm] [Draft] Remove to_underlying from root parameter header (PR #154249)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 09:05:55 PDT 2025
================
@@ -275,11 +275,14 @@ void DXContainerWriter::writeParts(raw_ostream &OS) {
for (DXContainerYAML::RootParameterLocationYaml &L :
P.RootSignature->Parameters.Locations) {
- dxbc::RTS0::v1::RootParameterHeader Header{L.Header.Type, L.Header.Visibility,
- L.Header.Offset};
- switch (L.Header.Type) {
- case llvm::to_underlying(dxbc::RootParameterType::Constants32Bit): {
+ mcdxbc::RootParameterHeader Header{
+ static_cast<dxbc::RootParameterType>(L.Header.Type),
+ static_cast<dxbc::ShaderVisibility>(L.Header.Visibility),
+ L.Header.Offset};
+
+ switch (Header.ParameterType) {
----------------
bogner wrote:
Note that the `default` label in this switch becomes unreachable when we're switching over the enum itself, so it will need to be removed.
https://github.com/llvm/llvm-project/pull/154249
More information about the llvm-commits
mailing list