From: Craig Topper Date: Wed, 13 May 2015 06:57:51 +0000 (+0000) Subject: Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterat... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=448c555c540577252ff431b2bfa6e28bf9ddf38e Use ArrayRef::slice instead of manually constructing an ArrayRef from ArrayRef iterators. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237231 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 29a1aa41b06..ad9aea20449 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -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::iterator begin = LHSl->getValues().begin()+1; - ArrayRef::iterator end = LHSl->getValues().end(); - ListInit *Result = - ListInit::get(ArrayRef(begin, end - begin), - LHSl->getType()); - return Result; + return ListInit::get(LHSl->getValues().slice(1), LHSl->getType()); } break; }