From a940095ae2c1eaacb38cba0a7916b91772431d91 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 24 Sep 2003 22:06:25 +0000 Subject: [PATCH] Do not use BasicBlock::*_iterator, just use *_iterator itself. Isn't updating copy and pasted code a joy llvm-svn: 8702 --- .../Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp | 3 +-- llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp | 3 +-- .../Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp | 3 +-- .../Transforms/Instrumentation/ProfilePaths/RetracePath.cpp | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp index f6f3016acd51..16f98e7d08a6 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp @@ -57,8 +57,7 @@ void CombineBranches::getBackEdgesVisit(BasicBlock *u, time++; d[u]=time; - for(BasicBlock::succ_iterator vl = succ_begin(u), - ve = succ_end(u); vl != ve; ++vl){ + for (succ_iterator vl = succ_begin(u), ve = succ_end(u); vl != ve; ++vl){ BasicBlock *BB = *vl; diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp index 6802c4fd96c3..74209b7ea5d0 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp @@ -58,8 +58,7 @@ void InstLoops::getBackEdgesVisit(BasicBlock *u, time++; d[u]=time; - for(BasicBlock::succ_iterator vl = succ_begin(u), - ve = succ_end(u); vl != ve; ++vl){ + for(succ_iterator vl = succ_begin(u), ve = succ_end(u); vl != ve; ++vl){ BasicBlock *BB = *vl; if(color[BB]!=GREY && color[BB]!=BLACK){ diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index aa46048ae034..962996247cee 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -98,8 +98,7 @@ bool ProfilePaths::runOnFunction(Function &F){ Node *nd=findBB(nodes, BB); assert(nd && "No node for this edge!"); - for(BasicBlock::succ_iterator s=succ_begin(BB), se=succ_end(BB); - s!=se; ++s){ + for(succ_iterator s=succ_begin(BB), se=succ_end(BB); s!=se; ++s){ Node *nd2=findBB(nodes,*s); assert(nd2 && "No node for this edge!"); Edge ed(nd,nd2,0); diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp index 805250fd9a07..0f8382319a36 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp @@ -216,8 +216,7 @@ void getBBtrace(vector &vBB, int pathNo, Function *M){//, Node *nd=findBB(nodes, BB); assert(nd && "No node for this edge!"); - for(BasicBlock::succ_iterator s=succ_begin(BB), se=succ_end(BB); - s!=se; ++s){ + for(succ_iterator s=succ_begin(BB), se=succ_end(BB); s!=se; ++s){ if(triggerBBs[*s] == 9){ //if(!pathReg[M]){ //Get the path register for this! -- GitLab