projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
395ce4b
)
Assert that region is not cloned into itself.
author
Christian Sigg
<csigg@google.com>
Wed, 9 Oct 2019 09:43:18 +0000
(
02:43
-0700)
committer
A. Unique TensorFlower
<gardener@tensorflow.org>
Wed, 9 Oct 2019 09:43:52 +0000
(
02:43
-0700)
PiperOrigin-RevId:
273707291
mlir/lib/IR/Region.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/IR/Region.cpp
b/mlir/lib/IR/Region.cpp
index
2d9f62c
..
4e408f2
100644
(file)
--- a/
mlir/lib/IR/Region.cpp
+++ b/
mlir/lib/IR/Region.cpp
@@
-78,6
+78,7
@@
void Region::cloneInto(Region *dest, BlockAndValueMapping &mapper) {
void Region::cloneInto(Region *dest, Region::iterator destPos,
BlockAndValueMapping &mapper) {
assert(dest && "expected valid region to clone into");
+ assert(this != dest && "cannot clone region into itself");
// If the list is empty there is nothing to clone.
if (empty())