Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.

llvm-svn: 185509
This commit is contained in:
Craig Topper 2013-07-03 04:42:33 +00:00
parent 2b4a201ba6
commit 24fd7eed8a
1 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ void LexicalScopes::constructScopeNest(LexicalScope *Scope) {
LexicalScope *WS = WorkStack.back(); LexicalScope *WS = WorkStack.back();
const SmallVectorImpl<LexicalScope *> &Children = WS->getChildren(); const SmallVectorImpl<LexicalScope *> &Children = WS->getChildren();
bool visitedChildren = false; 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) { SE = Children.end(); SI != SE; ++SI) {
LexicalScope *ChildScope = *SI; LexicalScope *ChildScope = *SI;
if (!ChildScope->getDFSOut()) { if (!ChildScope->getDFSOut()) {
@ -280,7 +280,7 @@ getMachineBasicBlocks(DebugLoc DL,
} }
SmallVectorImpl<InsnRange> &InsnRanges = Scope->getRanges(); 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) { E = InsnRanges.end(); I != E; ++I) {
InsnRange &R = *I; InsnRange &R = *I;
MBBs.insert(R.first->getParent()); MBBs.insert(R.first->getParent());