From: Chris Lattner Date: Sat, 31 Jul 2004 18:40:36 +0000 (+0000) Subject: Next on a pointer increments the pointer, not an iterator X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7f74340733967255cf45f6514cf0f18a1f325371;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index ef28c958859..a82cad27674 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()) {