LLVM API Documentation
Path iterator. More...
#include <Path.h>
Public Types | |
typedef const StringRef | value_type |
typedef ptrdiff_t | difference_type |
typedef value_type & | reference |
typedef value_type * | pointer |
typedef std::bidirectional_iterator_tag | iterator_category |
Public Member Functions | |
reference | operator* () const |
pointer | operator-> () const |
const_iterator & | operator++ () |
const_iterator & | operator++ (int) |
const_iterator & | operator-- () |
const_iterator & | operator-- (int) |
bool | operator== (const const_iterator &RHS) const |
bool | operator!= (const const_iterator &RHS) const |
ptrdiff_t | operator- (const const_iterator &RHS) const |
Difference in bytes between this and RHS. More... | |
Friends | |
const_iterator | begin (StringRef path) |
Get begin iterator over path. More... | |
const_iterator | end (StringRef path) |
Get end iterator over path. More... | |
Path iterator.
This is a bidirectional iterator that iterates over the individual components in path. The forward traversal order is as follows:
Iteration examples. Each component is separated by ',':
typedef ptrdiff_t llvm::sys::path::const_iterator::difference_type |
typedef std::bidirectional_iterator_tag llvm::sys::path::const_iterator::iterator_category |
typedef const StringRef llvm::sys::path::const_iterator::value_type |
bool llvm::sys::path::const_iterator::operator!= | ( | const const_iterator & | RHS | ) | const |
|
inline |
const_iterator & llvm::sys::path::const_iterator::operator++ | ( | ) |
Definition at line 188 of file Path.cpp.
References llvm::StringRef::endswith(), llvm::StringRef::find_first_of(), llvm::sys::path::is_separator(), llvm::StringRef::size(), llvm::StringRef::slice(), and llvm::StringRef::substr().
const_iterator& llvm::sys::path::const_iterator::operator++ | ( | int | ) |
ptrdiff_t llvm::sys::path::const_iterator::operator- | ( | const const_iterator & | RHS | ) | const |
const_iterator & llvm::sys::path::const_iterator::operator-- | ( | ) |
Definition at line 241 of file Path.cpp.
References llvm::sys::path::is_separator(), llvm::StringRef::size(), llvm::StringRef::slice(), and llvm::StringRef::substr().
const_iterator& llvm::sys::path::const_iterator::operator-- | ( | int | ) |
|
inline |
bool llvm::sys::path::const_iterator::operator== | ( | const const_iterator & | RHS | ) | const |
Definition at line 271 of file Path.cpp.
References llvm::StringRef::begin().
|
friend |
|
friend |
Get end iterator over path.
path | Input path. |
Definition at line 181 of file Path.cpp.
Referenced by llvm::DWARFDebugLine::LineTable::dump(), llvm::MipsRegisterInfo::getReservedRegs(), and llvm::opt::OptTable::PrintHelp().