diff --git a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp --- a/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp +++ b/mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp @@ -11,13 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "mlir/IR/Operation.h" -#include "mlir/IR/StandardTypes.h" #include "mlir/Pass/Pass.h" #include "toy/Dialect.h" #include "toy/Passes.h" #include "toy/ShapeInferenceInterface.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -91,9 +88,10 @@ } } - /// A utility method that returns if the given operation has all of its operand inferred. + /// A utility method that returns if the given operation has all of its + /// operand inferred. static bool allOperandsInferred(Operation *op) { - return llvm::all_of(op->getOperandTypes(), [](Type operandType) { + return llvm::all_of(op->getOperandTypes(), [](Type operandType) { return operandType.isa(); }); }