[llvm-commits] [llvm] r150471 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Feb 14 02:29:27 PST 2012


Author: d0k
Date: Tue Feb 14 04:29:27 2012
New Revision: 150471

URL: http://llvm.org/viewvc/llvm-project?rev=150471&view=rev
Log:
Turn push_back loops into append/insert.

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=150471&r1=150470&r2=150471&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Tue Feb 14 04:29:27 2012
@@ -503,8 +503,7 @@
 /// indexes.
 void MachineModuleInfo::setCallSiteLandingPad(MCSymbol *Sym,
                                               ArrayRef<unsigned> Sites) {
-  for (unsigned I = 0, E = Sites.size(); I != E; ++I)
-    LPadToCallSiteMap[Sym].push_back(Sites[I]);
+  LPadToCallSiteMap[Sym].append(Sites.begin(), Sites.end());
 }
 
 /// getTypeIDFor - Return the type id for the specified typeinfo.  This is
@@ -541,8 +540,7 @@
   // Add the new filter.
   int FilterID = -(1 + FilterIds.size());
   FilterIds.reserve(FilterIds.size() + TyIds.size() + 1);
-  for (unsigned I = 0, N = TyIds.size(); I != N; ++I)
-    FilterIds.push_back(TyIds[I]);
+  FilterIds.insert(FilterIds.end(), TyIds.begin(), TyIds.end());
   FilterEnds.push_back(FilterIds.size());
   FilterIds.push_back(0); // terminator
   return FilterID;





More information about the llvm-commits mailing list