summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index b69a98ccc7d..5a365f2a657 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1309,7 +1309,7 @@ bool MachineOutliner::outline(
// First inst in outlined range <-- Anything that's defined in this
// ... .. range has to be added as an implicit
// Last inst in outlined range <-- def to the call instruction.
- std::for_each(CallInst, EndIt, CopyDefs);
+ std::for_each(CallInst, std::next(EndIt), CopyDefs);
}
// Erase from the point after where the call was inserted up to, and
OpenPOWER on IntegriCloud