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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2013-07-03 04:42:33 +00:00
parent 01eb99af2f
commit 40c744ee33

View File

@ -220,7 +220,7 @@ void LexicalScopes::constructScopeNest(LexicalScope *Scope) {
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());