aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-31 18:40:36 +0000
committerChris Lattner <sabre@nondot.org>2004-07-31 18:40:36 +0000
commit7f74340733967255cf45f6514cf0f18a1f325371 (patch)
tree3e673bd72659ceb354926de032090e4711aa7aa2 /lib/CodeGen/BranchFolding.cpp
parent9fd332392c184b13eeb2bd3ffc4347034bc7408a (diff)
Next on a pointer increments the pointer, not an iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r--lib/CodeGen/BranchFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index ef28c95885..a82cad2767 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -114,7 +114,7 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB,
// explicitly.
if (MBB->empty()) {
if (MBB->pred_empty()) return false;
- MachineFunction::iterator FallThrough = next(MBB);
+ MachineFunction::iterator FallThrough =next(MachineFunction::iterator(MBB));
assert(FallThrough != MBB->getParent()->end() &&
"Fell off the end of the function!");
while (!MBB->pred_empty()) {