mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 20:56:07 +00:00
Assert that region is not cloned into itself.
PiperOrigin-RevId: 273707291
This commit is contained in:
parent
395ce4b41b
commit
7c67ec0f03
@ -78,6 +78,7 @@ void Region::cloneInto(Region *dest, BlockAndValueMapping &mapper) {
|
|||||||
void Region::cloneInto(Region *dest, Region::iterator destPos,
|
void Region::cloneInto(Region *dest, Region::iterator destPos,
|
||||||
BlockAndValueMapping &mapper) {
|
BlockAndValueMapping &mapper) {
|
||||||
assert(dest && "expected valid region to clone into");
|
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 the list is empty there is nothing to clone.
|
||||||
if (empty())
|
if (empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user