diff --git a/utils/TableGen/CodeGenSchedule.cpp b/utils/TableGen/CodeGenSchedule.cpp index 818fce2048c..886c4c63944 100644 --- 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); } } }