Helper that emits a delimiter only after the first use.

Synopsis

Declared in <llvm/ADT/StringExtras.h>

class ListSeparator;

Description

Used to generate a comma‐separated list from a loop like so:

ListSeparator LS;
for (auto &I : C)
  OS << LS << I.getName();

Member Functions

Name

Description

ListSeparator [constructor]

Construct a separator that emits Prefix once, then Separator.

unused

Return true if the separator has not been used yet.

operator StringRef

Return the prefix on first use, then the separator thereafter.

Created with MrDocs