projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e77918c
)
Avoid undefined behavior from passing a std::vector's own contents
author
Dan Gohman
<dan433584@gmail.com>
Wed, 27 Mar 2013 18:44:56 +0000
(18:44 +0000)
committer
Dan Gohman
<dan433584@gmail.com>
Wed, 27 Mar 2013 18:44:56 +0000
(18:44 +0000)
in as an argument to push_back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178166
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/CodeGenSchedule.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/CodeGenSchedule.cpp
b/utils/TableGen/CodeGenSchedule.cpp
index 818fce2048c5d1b228715edc285db47a6cebe91a..886c4c6394484bd86e2e1d0997fd70228264e316 100644
(file)
--- a/
utils/TableGen/CodeGenSchedule.cpp
+++ b/
utils/TableGen/CodeGenSchedule.cpp
@@
-1105,7
+1105,9
@@
void PredTransitions::getIntersectingVariants(
// Push another copy of the current transition for more variants.
Variant.TransVecIdx = TransVec.size();
IntersectingVariants.push_back(Variant);
- TransVec.push_back(TransVec[TransIdx]);
+
+ PredTransition Trans = TransVec[TransIdx];
+ TransVec.push_back(Trans);
}
}
}