[llvm] r185509 - Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.

Craig Topper craig.topper at gmail.com
Tue Jul 2 21:42:33 PDT 2013


Author: ctopper
Date: Tue Jul  2 23:42:33 2013
New Revision: 185509

URL: http://llvm.org/viewvc/llvm-project?rev=185509&view=rev
Log:
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.

Modified:
    llvm/trunk/lib/CodeGen/LexicalScopes.cpp

Modified: llvm/trunk/lib/CodeGen/LexicalScopes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LexicalScopes.cpp?rev=185509&r1=185508&r2=185509&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LexicalScopes.cpp (original)
+++ llvm/trunk/lib/CodeGen/LexicalScopes.cpp Tue Jul  2 23:42:33 2013
@@ -220,7 +220,7 @@ void LexicalScopes::constructScopeNest(L
     LexicalScope *WS = WorkStack.back();
     const SmallVectorImpl<LexicalScope *> &Children = WS->getChildren();
     bool visitedChildren = false;
-    for (SmallVector<LexicalScope *, 4>::const_iterator SI = Children.begin(),
+    for (SmallVectorImpl<LexicalScope *>::const_iterator SI = Children.begin(),
            SE = Children.end(); SI != SE; ++SI) {
       LexicalScope *ChildScope = *SI;
       if (!ChildScope->getDFSOut()) {
@@ -280,7 +280,7 @@ getMachineBasicBlocks(DebugLoc DL,
   }
 
   SmallVectorImpl<InsnRange> &InsnRanges = Scope->getRanges();
-  for (SmallVector<InsnRange, 4>::iterator I = InsnRanges.begin(),
+  for (SmallVectorImpl<InsnRange>::iterator I = InsnRanges.begin(),
          E = InsnRanges.end(); I != E; ++I) {
     InsnRange &R = *I;
     MBBs.insert(R.first->getParent());





More information about the llvm-commits mailing list