[llvm] [DirectX] Refactor RootSignature Backend to remove `to_underlying` from Root Parameter Header (PR #154249)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 10:25:21 PDT 2025


================
@@ -171,26 +172,26 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
        << "RootParametersOffset: " << RS.RootParameterOffset << "\n"
        << "NumParameters: " << RS.ParametersContainer.size() << "\n";
     for (size_t I = 0; I < RS.ParametersContainer.size(); I++) {
-      const auto &[Type, Loc] =
-          RS.ParametersContainer.getTypeAndLocForParameter(I);
-      const dxbc::RTS0::v1::RootParameterHeader Header =
-          RS.ParametersContainer.getHeader(I);
-
-      OS << "- Parameter Type: " << Type << "\n"
-         << "  Shader Visibility: " << Header.ShaderVisibility << "\n";
-
-      switch (Type) {
-      case llvm::to_underlying(dxbc::RootParameterType::Constants32Bit): {
+      const auto &Info = RS.ParametersContainer.getInfo(I);
----------------
bogner wrote:

Better to explicitly spell the type here.

https://github.com/llvm/llvm-project/pull/154249


More information about the llvm-commits mailing list