aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-09 23:17:45 +0000
committerChris Lattner <sabre@nondot.org>2006-11-09 23:17:45 +0000
commita9d709d51a952a61d8baf413036363adcc90a3e2 (patch)
tree8cce6ac2def64cb84b12471a5cd84e32e3fc86d3 /lib/Transforms
parentd4448796cf4175700997597e975734f3b0b6b42c (diff)
downloadexternal_llvm-a9d709d51a952a61d8baf413036363adcc90a3e2.zip
external_llvm-a9d709d51a952a61d8baf413036363adcc90a3e2.tar.gz
external_llvm-a9d709d51a952a61d8baf413036363adcc90a3e2.tar.bz2
Minimal patch to fix PR992/PR993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/Inliner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index edb34be..b7c4ce1 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -132,8 +132,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) {
// Attempt to inline the function...
if (InlineCallIfPossible(CS, CG, SCCFunctions)) {
// Remove this call site from the list.
- std::swap(CallSites[CSi], CallSites.back());
- CallSites.pop_back();
+ CallSites.erase(CallSites.begin()+CSi);
--CSi;
++NumInlined;