summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/OperationSupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/OperationSupport.cpp')
-rw-r--r--mlir/lib/IR/OperationSupport.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/mlir/lib/IR/OperationSupport.cpp b/mlir/lib/IR/OperationSupport.cpp
index 1c68686a0cb..5dfd3b02cc6 100644
--- a/mlir/lib/IR/OperationSupport.cpp
+++ b/mlir/lib/IR/OperationSupport.cpp
@@ -155,7 +155,7 @@ ResultRange::ResultRange(Operation *op)
//===----------------------------------------------------------------------===//
// ValueRange
-ValueRange::ValueRange(ArrayRef<ValuePtr> values)
+ValueRange::ValueRange(ArrayRef<Value> values)
: ValueRange(values.data(), values.size()) {}
ValueRange::ValueRange(OperandRange values)
: ValueRange(values.begin().getBase(), values.size()) {}
@@ -167,19 +167,18 @@ ValueRange::OwnerT ValueRange::offset_base(const OwnerT &owner,
ptrdiff_t index) {
if (OpOperand *operand = owner.dyn_cast<OpOperand *>())
return operand + index;
- if (OpResultPtr result = owner.dyn_cast<OpResultPtr>())
+ if (OpResult *result = owner.dyn_cast<OpResult *>())
return result + index;
- return owner.get<ValuePtr const *>() + index;
+ return owner.get<const Value *>() + index;
}
/// See `detail::indexed_accessor_range_base` for details.
-ValuePtr ValueRange::dereference_iterator(const OwnerT &owner,
- ptrdiff_t index) {
+Value ValueRange::dereference_iterator(const OwnerT &owner, ptrdiff_t index) {
// Operands access the held value via 'get'.
if (OpOperand *operand = owner.dyn_cast<OpOperand *>())
return operand[index].get();
// An OpResult is a value, so we can return it directly.
- if (OpResultPtr result = owner.dyn_cast<OpResultPtr>())
- return &result[index];
+ if (OpResult *result = owner.dyn_cast<OpResult *>())
+ return result[index];
// Otherwise, this is a raw value array so just index directly.
- return owner.get<ValuePtr const *>()[index];
+ return owner.get<const Value *>()[index];
}
OpenPOWER on IntegriCloud