From 2bdf33cc4c733342fc83081bc7410ac5e9a24f55 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Sat, 11 Jan 2020 08:54:04 -0800 Subject: [mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is properly value-typed. Summary: These were temporary methods used to simplify the transition. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D72548 --- mlir/test/lib/TestDialect/TestDialect.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mlir/test/lib/TestDialect/TestDialect.cpp') diff --git a/mlir/test/lib/TestDialect/TestDialect.cpp b/mlir/test/lib/TestDialect/TestDialect.cpp index 21cf69ec1fa..fef1f653307 100644 --- a/mlir/test/lib/TestDialect/TestDialect.cpp +++ b/mlir/test/lib/TestDialect/TestDialect.cpp @@ -100,7 +100,7 @@ struct TestInlinerInterface : public DialectInlinerInterface { // Replace the values directly with the return operands. assert(returnOp.getNumOperands() == valuesToRepl.size()); for (const auto &it : llvm::enumerate(returnOp.getOperands())) - valuesToRepl[it.index()]->replaceAllUsesWith(it.value()); + valuesToRepl[it.index()].replaceAllUsesWith(it.value()); } /// Attempt to materialize a conversion for a type mismatch between a call @@ -113,7 +113,7 @@ struct TestInlinerInterface : public DialectInlinerInterface { Location conversionLoc) const final { // Only allow conversion for i16/i32 types. if (!(resultType.isInteger(16) || resultType.isInteger(32)) || - !(input->getType().isInteger(16) || input->getType().isInteger(32))) + !(input.getType().isInteger(16) || input.getType().isInteger(32))) return nullptr; return builder.create(conversionLoc, resultType, input); } @@ -298,12 +298,12 @@ LogicalResult mlir::OpWithInferTypeInterfaceOp::inferReturnTypes( llvm::Optional location, ValueRange operands, ArrayRef attributes, RegionRange regions, SmallVectorImpl &inferedReturnTypes) { - if (operands[0]->getType() != operands[1]->getType()) { + if (operands[0].getType() != operands[1].getType()) { return emitOptionalError(location, "operand type mismatch ", - operands[0]->getType(), " vs ", - operands[1]->getType()); + operands[0].getType(), " vs ", + operands[1].getType()); } - inferedReturnTypes.assign({operands[0]->getType()}); + inferedReturnTypes.assign({operands[0].getType()}); return success(); } -- cgit v1.2.3