Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterators. NFC

llvm-svn: 237231
This commit is contained in:
Craig Topper 2015-05-13 06:57:51 +00:00
parent 05df698d2b
commit 607ac92dcb
1 changed files with 1 additions and 6 deletions

View File

@ -788,12 +788,7 @@ Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
assert(LHSl->getSize() != 0 && "Empty list in cdr");
// Note the +1. We can't just pass the result of getValues()
// directly.
ArrayRef<Init *>::iterator begin = LHSl->getValues().begin()+1;
ArrayRef<Init *>::iterator end = LHSl->getValues().end();
ListInit *Result =
ListInit::get(ArrayRef<Init *>(begin, end - begin),
LHSl->getType());
return Result;
return ListInit::get(LHSl->getValues().slice(1), LHSl->getType());
}
break;
}