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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2013-07-03 05:18:47 +00:00
parent 78477ffdfd
commit 32bdf82b9f

View File

@ -2763,8 +2763,8 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
bool mayStore = MCID.mayStore();
unsigned NumMemRefs = 0;
for (SmallVector<MachineMemOperand*, 2>::const_iterator I =
MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
for (SmallVectorImpl<MachineMemOperand *>::const_iterator I =
MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
if ((*I)->isLoad()) {
if (mayLoad)
++NumMemRefs;
@ -2780,8 +2780,8 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
MF->allocateMemRefsArray(NumMemRefs);
MachineSDNode::mmo_iterator MemRefsPos = MemRefs;
for (SmallVector<MachineMemOperand*, 2>::const_iterator I =
MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
for (SmallVectorImpl<MachineMemOperand *>::const_iterator I =
MatchedMemRefs.begin(), E = MatchedMemRefs.end(); I != E; ++I) {
if ((*I)->isLoad()) {
if (mayLoad)
*MemRefsPos++ = *I;