[llvm-commits] [llvm] r150436 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Bill Wendling
isanbard at gmail.com
Mon Feb 13 15:45:26 PST 2012
Author: void
Date: Mon Feb 13 17:45:26 2012
New Revision: 150436
URL: http://llvm.org/viewvc/llvm-project?rev=150436&view=rev
Log:
Don't recalculate the size of the vector each time through the loop.
Modified:
llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=150436&r1=150435&r2=150436&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Mon Feb 13 17:45:26 2012
@@ -561,13 +561,13 @@
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;
}
More information about the llvm-commits
mailing list