summaryrefslogtreecommitdiff
path: root/mlir/include
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/include')
-rw-r--r--mlir/include/mlir/IR/PDLPatternMatch.h.inc12
1 files changed, 4 insertions, 8 deletions
diff --git a/mlir/include/mlir/IR/PDLPatternMatch.h.inc b/mlir/include/mlir/IR/PDLPatternMatch.h.inc
index d5fb57d7c360..4afbcf292496 100644
--- a/mlir/include/mlir/IR/PDLPatternMatch.h.inc
+++ b/mlir/include/mlir/IR/PDLPatternMatch.h.inc
@@ -152,9 +152,7 @@ public:
void push_back(TypeRange value) {
// The lifetime of a TypeRange can't be guaranteed, so we'll need to
// allocate a storage for it.
- llvm::OwningArrayRef<Type> storage(value.size());
- llvm::copy(value, storage.begin());
- allocatedTypeRanges.emplace_back(std::move(storage));
+ allocatedTypeRanges.emplace_back(value.begin(), value.end());
typeRanges.push_back(allocatedTypeRanges.back());
results.push_back(&typeRanges.back());
}
@@ -174,9 +172,7 @@ public:
void push_back(ValueRange value) {
// The lifetime of a ValueRange can't be guaranteed, so we'll need to
// allocate a storage for it.
- llvm::OwningArrayRef<Value> storage(value.size());
- llvm::copy(value, storage.begin());
- allocatedValueRanges.emplace_back(std::move(storage));
+ allocatedValueRanges.emplace_back(value.begin(), value.end());
valueRanges.push_back(allocatedValueRanges.back());
results.push_back(&valueRanges.back());
}
@@ -206,8 +202,8 @@ protected:
SmallVector<ValueRange> valueRanges;
/// Memory allocated to store ranges in the result list whose lifetime was
/// generated in the native function.
- SmallVector<llvm::OwningArrayRef<Type>> allocatedTypeRanges;
- SmallVector<llvm::OwningArrayRef<Value>> allocatedValueRanges;
+ SmallVector<std::vector<Type>> allocatedTypeRanges;
+ SmallVector<std::vector<Value>> allocatedValueRanges;
};
//===----------------------------------------------------------------------===//