diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-03-29 18:48:42 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-03-29 18:48:42 +0000 |
commit | 7d4ff60b55772c731688cd27f9252e31ae964f84 (patch) | |
tree | 2c50b06d522e2af7b0ec15837e0f2f0b3c7da8b8 /lib/Analysis | |
parent | f24caa44213f08c151c0fca8627b3d612d7b2e72 (diff) |
Fix loop style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 57bce84e83..2240e9de33 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -1136,7 +1136,7 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, // Make sure to clean up the Visited map before continuing on to // PredTranslationFailure. - for (unsigned i = 0; i < PredList.size(); i++) + for (unsigned i = 0, n = PredList.size(); i < n; ++i) Visited.erase(PredList[i].first); goto PredTranslationFailure; @@ -1148,7 +1148,7 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, // any results for. (getNonLocalPointerDepFromBB will modify our // datastructures in ways the code after the PredTranslationFailure label // doesn't expect.) - for (unsigned i = 0; i < PredList.size(); i++) { + for (unsigned i = 0, n = PredList.size(); i < n; ++i) { BasicBlock *Pred = PredList[i].first; PHITransAddr &PredPointer = PredList[i].second; Value *PredPtrVal = PredPointer.getAddr(); |