[PATCH] D26999: Add some functions to search ArrayRefs

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 13:48:05 PST 2016


zturner created this revision.
zturner added reviewers: chandlerc, mehdi_amini.
zturner added a subscriber: llvm-commits.

This mirrors the interface of `StringRef` by adding functions for searching and dropping items from an `ArrayRef` until a certain condition is met.  Specifically, this adds `take_front`, `take_back`, `drop_front`, and `drop_back`, along with helper functions `find_if` and `find_if_not`.


https://reviews.llvm.org/D26999

Files:
  include/llvm/ADT/ArrayRef.h
  unittests/ADT/ArrayRefTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26999.78942.patch
Type: text/x-patch
Size: 8033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161122/ffb043fe/attachment.bin>


More information about the llvm-commits mailing list