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:
166121a
)
IntervalIterator: Add move semantics rather than relying on broken implicit copy...
author
David Blaikie
<dblaikie@gmail.com>
Sun, 15 Mar 2015 01:21:34 +0000
(
01:21
+0000)
committer
David Blaikie
<dblaikie@gmail.com>
Sun, 15 Mar 2015 01:21:34 +0000
(
01:21
+0000)
We were just getting lucky because the copy ctor would be elided by RVO.
llvm-svn: 232297
llvm/include/llvm/Analysis/IntervalIterator.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/Analysis/IntervalIterator.h
b/llvm/include/llvm/Analysis/IntervalIterator.h
index
ab70ad9
..
da622fd
100644
(file)
--- a/
llvm/include/llvm/Analysis/IntervalIterator.h
+++ b/
llvm/include/llvm/Analysis/IntervalIterator.h
@@
-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())) {