[all-commits] [llvm/llvm-project] f4b71e: [llvm] [ADT] Add a range/iterator-based Split()

Michał Górny via All-commits all-commits at lists.llvm.org
Mon Sep 27 01:43:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f4b71e3479bfaec71ba5f4bb56c6a34357a7f938
      https://github.com/llvm/llvm-project/commit/f4b71e3479bfaec71ba5f4bb56c6a34357a7f938
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-09-27 (Mon, 27 Sep 2021)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M llvm/include/llvm/ADT/StringExtras.h
    M llvm/unittests/ADT/StringExtrasTest.cpp

  Log Message:
  -----------
  [llvm] [ADT] Add a range/iterator-based Split()

Add a llvm::Split() implementation that can be used via range-for loop,
e.g.:

    for (StringRef x : llvm::Split("foo,bar,baz", ','))
      ...

The implementation uses an additional SplittingIterator class that
uses StringRef::split() internally.

Differential Revision: https://reviews.llvm.org/D110496




More information about the All-commits mailing list