LLVM 20.0.0git
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]

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.
 
- 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_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator-- ()
 
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
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Friends

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

Additional Inherited Members

- Public Types inherited from llvm::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >
using iterator_category = std::input_iterator_tag
 
using value_type = const StringRef
 
using difference_type = std::ptrdiff_t
 
using pointer = const StringRef *
 
using reference = const StringRef &
 
- 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
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34

Definition at line 73 of file Path.h.

Member Function Documentation

◆ operator*()

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

Definition at line 86 of file Path.h.

◆ operator++()

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

◆ operator-()

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

Difference in bytes between this and RHS.

Definition at line 294 of file Path.cpp.

References RHS.

◆ operator==()

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

Definition at line 290 of file Path.cpp.

References llvm::StringRef::begin(), and RHS.

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 227 of file Path.cpp.

◆ 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 236 of file Path.cpp.

Referenced by llvm::detail::all_of_zip_predicate_first(), llvm::MemoryDepChecker::areDepsSafe(), and llvm::SparcRegisterInfo::getReservedRegs().


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