forked from OSchip/llvm-project
Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterators. NFC
llvm-svn: 237231
This commit is contained in:
parent
05df698d2b
commit
607ac92dcb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue