From a9d709d51a952a61d8baf413036363adcc90a3e2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 9 Nov 2006 23:17:45 +0000 Subject: [PATCH] Minimal patch to fix PR992/PR993 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31608 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/Inliner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index edb34be203f..b7c4ce1f1ff 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -132,8 +132,7 @@ bool Inliner::runOnSCC(const std::vector &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; -- 2.34.1