summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-02-13 23:45:26 +0000
committerBill Wendling <isanbard@gmail.com>2012-02-13 23:45:26 +0000
commit150a371569d100e14a438cd4f89904da24c6cb20 (patch)
tree7a3e6369c7420b3e79576a2fc49a8856144115f9 /lib/CodeGen/MachineModuleInfo.cpp
parent2cc494b963e68895d6b6173bcc2ea02995d71442 (diff)
downloadllvm-150a371569d100e14a438cd4f89904da24c6cb20.tar.gz
llvm-150a371569d100e14a438cd4f89904da24c6cb20.tar.bz2
llvm-150a371569d100e14a438cd4f89904da24c6cb20.tar.xz
Don't recalculate the size of the vector each time through the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index a7bd0f7e9a..326f147f1a 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -561,13 +561,13 @@ unsigned MachineModuleInfo::getPersonalityIndex() const {
const Function* Personality = NULL;
// Scan landing pads. If there is at least one non-NULL personality - use it.
- for (unsigned i = 0; i != LandingPads.size(); ++i)
+ for (unsigned i = 0, e = LandingPads.size(); i != e; ++i)
if (LandingPads[i].Personality) {
Personality = LandingPads[i].Personality;
break;
}
- for (unsigned i = 0; i < Personalities.size(); ++i) {
+ for (unsigned i = 0, e = Personalities.size(); i < e; ++i) {
if (Personalities[i] == Personality)
return i;
}