summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/ExtractFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO/ExtractFunction.cpp')
-rw-r--r--lib/Transforms/IPO/ExtractFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/ExtractFunction.cpp b/lib/Transforms/IPO/ExtractFunction.cpp
index 482964e86f..2d291b7a88 100644
--- a/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/lib/Transforms/IPO/ExtractFunction.cpp
@@ -63,7 +63,7 @@ namespace {
// can be "used", instead of ones with bodies.
std::vector<Function*> NewFunctions;
- Function *Last = &M.back(); // Figure out where the last real fn is...
+ Function *Last = --M.end(); // Figure out where the last real fn is.
for (Module::iterator I = M.begin(); ; ++I) {
if (&*I != Named) {