diff --git a/mlir/lib/CAPI/Dialect/Linalg.cpp b/mlir/lib/CAPI/Dialect/Linalg.cpp --- a/mlir/lib/CAPI/Dialect/Linalg.cpp +++ b/mlir/lib/CAPI/Dialect/Linalg.cpp @@ -34,8 +34,8 @@ SmallVector argTypes; auto linalgOp = cast(op); - for (auto t : linalgOp.getShapedOperandTypes()) - argTypes.push_back(getElementTypeOrSelf(t)); + for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands()) + argTypes.push_back(getElementTypeOrSelf(opOperand->get().getType())); ImplicitLocOpBuilder b(op->getLoc(), op->getContext()); Region ®ion = op->getRegion(0);