From e1c1d363a5ea271980fbbfa5a49963b30ab99f62 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 3 Jul 2013 05:11:49 +0000 Subject: Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily. llvm-svn: 185512 --- llvm/lib/CodeGen/StackSlotColoring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp') diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index b166671e1ba..9a9b8897ee5 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/lib/CodeGen/StackSlotColoring.cpp @@ -197,7 +197,7 @@ void StackSlotColoring::InitializeSlots() { /// LiveIntervals that have already been assigned to the specified color. bool StackSlotColoring::OverlapWithAssignments(LiveInterval *li, int Color) const { - const SmallVector &OtherLIs = Assignments[Color]; + const SmallVectorImpl &OtherLIs = Assignments[Color]; for (unsigned i = 0, e = OtherLIs.size(); i != e; ++i) { LiveInterval *OtherLI = OtherLIs[i]; if (OtherLI->overlaps(*li)) @@ -297,7 +297,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) { if (NewFI == -1 || (NewFI == (int)SS)) continue; - SmallVector &RefMIs = SSRefs[SS]; + SmallVectorImpl &RefMIs = SSRefs[SS]; for (unsigned i = 0, e = RefMIs.size(); i != e; ++i) RewriteInstruction(RefMIs[i], SS, NewFI, MF); } @@ -378,7 +378,7 @@ bool StackSlotColoring::RemoveDeadStores(MachineBasicBlock* MBB) { ++I; } - for (SmallVector::iterator I = toErase.begin(), + for (SmallVectorImpl::iterator I = toErase.begin(), E = toErase.end(); I != E; ++I) (*I)->eraseFromParent(); -- cgit v1.2.3