summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Parser/Parser.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2020-01-11 08:54:04 -0800
committerRiver Riddle <riverriddle@google.com>2020-01-11 08:54:39 -0800
commit2bdf33cc4c733342fc83081bc7410ac5e9a24f55 (patch)
tree3306d769c2bbabda1060928e0cea79d021ea9da2 /mlir/lib/Parser/Parser.cpp
parent1d641daf260308815d014d1bf1b424a1ed1e7277 (diff)
downloadbcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.tar.gz
bcm5719-llvm-2bdf33cc4c733342fc83081bc7410ac5e9a24f55.zip
[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
Diffstat (limited to 'mlir/lib/Parser/Parser.cpp')
-rw-r--r--mlir/lib/Parser/Parser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index 942a93e5897..13196c34d66 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -3256,8 +3256,8 @@ OperationParser::~OperationParser() {
for (auto &fwd : forwardRefPlaceholders) {
// Drop all uses of undefined forward declared reference and destroy
// defining operation.
- fwd.first->dropAllUses();
- fwd.first->getDefiningOp()->destroy();
+ fwd.first.dropAllUses();
+ fwd.first.getDefiningOp()->destroy();
}
}
@@ -3351,8 +3351,8 @@ ParseResult OperationParser::addDefinition(SSAUseInfo useInfo, Value value) {
// If it was a forward reference, update everything that used it to use
// the actual definition instead, delete the forward ref, and remove it
// from our set of forward references we track.
- existing->replaceAllUsesWith(value);
- existing->getDefiningOp()->destroy();
+ existing.replaceAllUsesWith(value);
+ existing.getDefiningOp()->destroy();
forwardRefPlaceholders.erase(existing);
}
@@ -3412,13 +3412,13 @@ Value OperationParser::resolveSSAUse(SSAUseInfo useInfo, Type type) {
if (useInfo.number < entries.size() && entries[useInfo.number].first) {
auto result = entries[useInfo.number].first;
// Check that the type matches the other uses.
- if (result->getType() == type)
+ if (result.getType() == type)
return result;
emitError(useInfo.loc, "use of value '")
.append(useInfo.name,
"' expects different type than prior uses: ", type, " vs ",
- result->getType())
+ result.getType())
.attachNote(getEncodedSourceLocation(entries[useInfo.number].second))
.append("prior use here");
return nullptr;
@@ -4545,7 +4545,7 @@ ParseResult OperationParser::parseOptionalBlockArgList(
// Finally, make sure the existing argument has the correct type.
auto arg = owner->getArgument(nextArgument++);
- if (arg->getType() != type)
+ if (arg.getType() != type)
return emitError("argument and block argument type mismatch");
return addDefinition(useInfo, arg);
});
OpenPOWER on IntegriCloud