diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-09-09 21:06:24 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-09-09 21:06:24 +0000 |
commit | afd4f30df450d749981f909331979bcee19edbe0 (patch) | |
tree | 083e9851c74c099a9346025b99d3cfa8b143e8c6 | |
parent | d9e12345af1992f6874569711efa0bafed0be02d (diff) | |
download | bcm5719-llvm-afd4f30df450d749981f909331979bcee19edbe0.tar.gz bcm5719-llvm-afd4f30df450d749981f909331979bcee19edbe0.zip |
Small amount of code clean-up: Don't use ".size()" when not necessary.
llvm-svn: 81380
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index 2b1a44f674a..3e82b0fc868 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -576,7 +576,7 @@ void DwarfException::EmitExceptionTable() { const unsigned TypeInfoSize = TD->getPointerSize(); // DW_EH_PE_absptr unsigned SizeTypes = TypeInfos.size() * TypeInfoSize; - unsigned TypeOffset = sizeof(int8_t) + // Call site format + unsigned TypeOffset = sizeof(int8_t) + // Call site format MCAsmInfo::getULEB128Size(SizeSites) + // Call-site table length SizeSites + SizeActions + SizeTypes; @@ -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. |