forked from OSchip/llvm-project
IntervalIterator: Add move semantics rather than relying on broken implicit copy ctor (found with -Wdeprecated)
We were just getting lucky because the copy ctor would be elided by RVO. llvm-svn: 232297
This commit is contained in:
parent
166121ad0b
commit
bdd9b3caad
|
@ -105,6 +105,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
IntervalIterator(IntervalIterator &&x)
|
||||
: IntStack(std::move(x.IntStack)), Visited(std::move(x.Visited)),
|
||||
OrigContainer(x.OrigContainer), IOwnMem(x.IOwnMem) {
|
||||
x.IOwnMem = false;
|
||||
}
|
||||
|
||||
IntervalIterator(IntervalPartition &IP, bool OwnMemory) : IOwnMem(OwnMemory) {
|
||||
OrigContainer = &IP;
|
||||
if (!ProcessInterval(IP.getRootInterval())) {
|
||||
|
|
Loading…
Reference in New Issue