Skip to content

Commit 564619b

Browse files
committed
Use cast<> instead of dyn_cast<> when we don't check the result (NFC)
1 parent 891a0d7 commit 564619b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,8 +2065,8 @@ void OpEmitter::genTypeInterfaceMethods() {
20652065
return;
20662066
// Generate 'inferReturnTypes' method declaration using the interface method
20672067
// declared in 'InferTypeOpInterface' op interface.
2068-
const auto *trait = dyn_cast<InterfaceTrait>(
2069-
op.getTrait("::mlir::InferTypeOpInterface::Trait"));
2068+
const auto *trait =
2069+
cast<InterfaceTrait>(op.getTrait("::mlir::InferTypeOpInterface::Trait"));
20702070
Interface interface = trait->getInterface();
20712071
Method *method = [&]() -> Method * {
20722072
for (const InterfaceMethod &interfaceMethod : interface.getMethods()) {

0 commit comments

Comments
 (0)