Avoid swap when a copy suffices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-05-31 12:50:41 +00:00
parent a9d6680cb1
commit c29df3cac7

View File

@ -468,7 +468,7 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) {
// move a call site to a function in this SCC before the
// 'FirstCallInSCC' barrier.
if (SCC.isSingular()) {
std::swap(CallSites[CSi], CallSites.back());
CallSites[CSi] = CallSites.back();
CallSites.pop_back();
} else {
CallSites.erase(CallSites.begin()+CSi);