[PATCH] D78064: [llvm][STLExtras] Move various iterator/range utilities from MLIR to LLVM

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 17:25:08 PDT 2020


lattner accepted this revision.
lattner added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/include/llvm/ADT/STLExtras.h:263
+/// Returns true of the given range only contains a single element.
+template <typename ContainerTy> bool has_single_element(ContainerTy &&c) {
+  auto it = std::begin(c), e = std::end(c);
----------------
STLExtras.h is hugely conflicted here, but I'd recommend naming this hasSingleElement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78064/new/

https://reviews.llvm.org/D78064





More information about the llvm-commits mailing list