Small amount of code clean-up: Don't use ".size()" when not necessary.

llvm-svn: 81380
This commit is contained in:
Bill Wendling 2009-09-09 21:06:24 +00:00
parent d9e12345af
commit afd4f30df4
1 changed files with 7 additions and 5 deletions

View File

@ -851,16 +851,18 @@ void DwarfException::EmitExceptionTable() {
void DwarfException::EndModule() {
if (MAI->getExceptionHandlingType() != ExceptionHandling::Dwarf)
return;
if (TimePassesIsEnabled)
ExceptionTimer->startTimer();
if (shouldEmitMovesModule || shouldEmitTableModule) {
const std::vector<Function *> Personalities = MMI->getPersonalities();
for (unsigned i = 0; i < Personalities.size(); ++i)
for (unsigned i = 0, e = Personalities.size(); i < e; ++i)
EmitCIE(Personalities[i], i);
for (std::vector<FunctionEHFrameInfo>::iterator I = EHFrames.begin(),
E = EHFrames.end(); I != E; ++I)
for (std::vector<FunctionEHFrameInfo>::iterator
I = EHFrames.begin(), E = EHFrames.end(); I != E; ++I)
EmitFDE(*I);
}
@ -882,7 +884,7 @@ void DwarfException::BeginFunction(MachineFunction *MF) {
MMI->TidyLandingPads();
// If any landing pads survive, we need an EH table.
if (MMI->getLandingPads().size())
if (!MMI->getLandingPads().empty())
shouldEmitTable = true;
// See if we need frame move info.