LLVM  8.0.1
Public Member Functions | Friends | List of all members
llvm::sys::path::const_iterator Class Reference

Path iterator. More...

#include "llvm/Support/Path.h"

Inheritance diagram for llvm::sys::path::const_iterator:
Inheritance graph
[legend]
Collaboration diagram for llvm::sys::path::const_iterator:
Collaboration graph
[legend]

Public Member Functions

reference operator* () const
 
const_iteratoroperator++ ()
 
bool operator== (const const_iterator &RHS) const
 
ptrdiff_t operator- (const const_iterator &RHS) const
 Difference in bytes between this and RHS. More...
 
- Public Member Functions inherited from llvm::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >
const_iterator operator+ (std::ptrdiff_t n) const
 
const_iterator operator- (std::ptrdiff_t n) 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
 
bool operator<= (const const_iterator &RHS) const
 
bool operator>= (const const_iterator &RHS) const
 
const StringRefoperator-> ()
 
const StringRefoperator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n)
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Friends

const_iterator begin (StringRef path, Style style)
 Get begin iterator over path. More...
 
const_iterator end (StringRef path)
 Get end iterator over path. More...
 

Additional Inherited Members

- Protected Types inherited from llvm::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >
enum  
 

Detailed Description

Path iterator.

This is an input iterator that iterates over the individual components in path. The traversal order is as follows:

Iteration examples. Each component is separated by ',':

/ => /
/foo => /,foo
foo/ => foo,.
/foo/bar => /,foo,bar
../ => ..,.
C:\foo\bar => C:,/,foo,bar

Definition at line 53 of file Path.h.

Member Function Documentation

◆ operator*()

reference llvm::sys::path::const_iterator::operator* ( ) const
inline

Definition at line 66 of file Path.h.

References llvm::operator-(), and llvm::operator==().

◆ operator++()

const_iterator & llvm::sys::path::const_iterator::operator++ ( )

Definition at line 266 of file Path.cpp.

References assert(), and llvm::sys::path::is_separator().

◆ operator-()

ptrdiff_t llvm::sys::path::const_iterator::operator- ( const const_iterator RHS) const

Difference in bytes between this and RHS.

Definition at line 317 of file Path.cpp.

◆ operator==()

bool llvm::sys::path::const_iterator::operator== ( const const_iterator RHS) const

Definition at line 313 of file Path.cpp.

References llvm::StringRef::begin().

Friends And Related Function Documentation

◆ begin

const_iterator begin ( StringRef  path,
Style  style = Style::native 
)
friend

Get begin iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized with the first component of path.

Definition at line 250 of file Path.cpp.

Referenced by isDebug(), and llvm::coverage::CoverageMapping::load().

◆ end

const_iterator end ( StringRef  path)
friend

Get end iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized to the end of path.

Definition at line 259 of file Path.cpp.

Referenced by llvm::LiveRange::covers(), llvm::MipsRegisterInfo::getReservedRegs(), isDebug(), and llvm::coverage::CoverageMapping::load().


The documentation for this class was generated from the following files: