[llvm] [TableGen] Remove an unnecessary cast (NFC) (PR #147454)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 20:17:24 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147454

parent is already of InstructionContext.


>From a34f361370c4e0deca9b5e3bcdd5e143e0ec5993 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 6 Jul 2025 20:04:02 -0700
Subject: [PATCH] [TableGen] Remove an unnecessary cast (NFC)

parent is already of InstructionContext.
---
 llvm/utils/TableGen/X86DisassemblerTables.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
index 3c422a32dcaf7..ed7a4fedbf730 100644
--- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
+++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
@@ -603,8 +603,7 @@ static inline bool inheritsFrom(InstructionContext child,
   case IC_EVEX_W_OPSIZE_KZ_B_U:
     return false;
   default:
-    errs() << "Unknown instruction class: "
-           << stringForContext((InstructionContext)parent) << "\n";
+    errs() << "Unknown instruction class: " << stringForContext(parent) << "\n";
     llvm_unreachable("Unknown instruction class");
   }
 }



More information about the llvm-commits mailing list