llvm.org GIT mirror llvm / af1c9b3
Really implement David Blaikie suggestion in full of seperating variable initialization from its usage in the push_back making collapse of the two statements unlikely even without a comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244470 91177308-0d34-0410-b5e6-96231b3b80d8 Yaron Keren 4 years ago
1 changed file(s) with 1 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
28832883 if (StopAddress != -1ULL && !Seq.empty()) {
28842884 // Insert end sequence row with the computed end address, but
28852885 // the same line as the previous one.
2886 // Do not collapse the next two statements as the push_back operation
2887 // may reallocate the vector and invalidate the iterator Seq.back().
28882886 auto NextLine = Seq.back();
2889 Seq.push_back(NextLine);
28902887 Seq.back().Address = StopAddress;
28912888 Seq.back().EndSequence = 1;
28922889 Seq.back().PrologueEnd = 0;
28932890 Seq.back().BasicBlock = 0;
28942891 Seq.back().EpilogueBegin = 0;
2892 Seq.push_back(NextLine);
28952893 insertLineSequence(Seq, NewRows);
28962894 }
28972895