Index: llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h =================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h @@ -61,7 +61,8 @@ MachineBasicBlock::instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } /// Returns an iterator pointing beyond the bundle containing \p I. @@ -69,7 +70,8 @@ MachineBasicBlock::const_instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } //===----------------------------------------------------------------------===// Index: llvm/trunk/include/llvm/Support/BranchProbability.h =================================================================== --- llvm/trunk/include/llvm/Support/BranchProbability.h +++ llvm/trunk/include/llvm/Support/BranchProbability.h @@ -128,27 +128,32 @@ BranchProbability operator+(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob += RHS; + Prob += RHS; + return Prob; } BranchProbability operator-(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob -= RHS; + Prob -= RHS; + return Prob; } BranchProbability operator*(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator*(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator/(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob /= RHS; + Prob /= RHS; + return Prob; } bool operator==(BranchProbability RHS) const { return N == RHS.N; } Index: llvm/trunk/lib/Support/Path.cpp =================================================================== --- llvm/trunk/lib/Support/Path.cpp +++ llvm/trunk/lib/Support/Path.cpp @@ -297,7 +297,8 @@ I.Path = Path; I.Position = Path.size(); I.S = style; - return ++I; + ++I; + return I; } reverse_iterator rend(StringRef Path) { Index: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp =================================================================== --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp @@ -1364,7 +1364,8 @@ MBB = MBB->getPrevNode(); MBBI = MBB->end(); } - return --MBBI; + --MBBI; + return MBBI; } static const Constant *getConstantFromPool(const MachineInstr &MI, Index: llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp =================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp +++ llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp @@ -24,10 +24,12 @@ /// Moves I before IP. Returns new insert point. static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) { // If I is IP, move the insert point down. - if (I == IP) - return ++IP; - // Otherwise, move I before IP and return IP. - I->moveBefore(&*IP); + if (I == IP) { + ++IP; + } else { + // Otherwise, move I before IP and return IP. + I->moveBefore(&*IP); + } return IP; }