From f4c5cf1d042df265dda7ad2bbae7c3e1b147b318 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 8 Jan 2015 21:07:55 +0000 Subject: [PATCH] CodeGen: Use handy new-fangled post-increment, NFC Drive-by cleanup; I noticed this when reviewing the patch that became r225466. llvm-svn: 225468 --- lib/CodeGen/CodeGenPrepare.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CodeGenPrepare.cpp b/lib/CodeGen/CodeGenPrepare.cpp index 7550df278e5..daab43e7f53 100644 --- a/lib/CodeGen/CodeGenPrepare.cpp +++ b/lib/CodeGen/CodeGenPrepare.cpp @@ -4330,7 +4330,7 @@ bool CodeGenPrepare::PlaceDbgValues(Function &F) { for (BasicBlock &BB : F) { Instruction *PrevNonDbgInst = nullptr; for (BasicBlock::iterator BI = BB.begin(), BE = BB.end(); BI != BE;) { - Instruction *Insn = BI; ++BI; + Instruction *Insn = BI++; DbgValueInst *DVI = dyn_cast(Insn); // Leave dbg.values that refer to an alloca alone. These // instrinsics describe the address of a variable (= the alloca)