clang 20.0.0git
Classes | Public Types | Public Member Functions | List of all members
clang::index::PathPool Class Reference

Pool of filesystem paths backed by a StringPool. More...

#include "clang/IndexSerialization/SerializablePathCollection.h"

Classes

struct  DirPath
 
struct  FilePath
 

Public Types

enum class  RootDirKind { Regular = 0 , CurrentWorkDir = 1 , SysRoot = 2 }
 Special root directory of a filesystem path. More...
 

Public Member Functions

size_t addFilePath (RootDirKind Root, const StringPool::StringOffsetSize &Dir, StringRef Filename)
 
StringPool::StringOffsetSize addDirPath (StringRef Dir)
 
llvm::ArrayRef< FilePathgetFilePaths () const
 
StringRef getPaths () const
 

Detailed Description

Pool of filesystem paths backed by a StringPool.

Definition at line 43 of file SerializablePathCollection.h.

Member Enumeration Documentation

◆ RootDirKind

Special root directory of a filesystem path.

Enumerator
Regular 
CurrentWorkDir 
SysRoot 

Definition at line 46 of file SerializablePathCollection.h.

Member Function Documentation

◆ addDirPath()

StringPool::StringOffsetSize PathPool::addDirPath ( StringRef  Dir)
Returns
offset in Paths and size of newly added directory.

Definition at line 29 of file SerializablePathCollection.cpp.

References clang::index::StringPool::add().

◆ addFilePath()

size_t PathPool::addFilePath ( RootDirKind  Root,
const StringPool::StringOffsetSize Dir,
StringRef  Filename 
)
Returns
index of the newly added file in FilePaths.

Definition at line 22 of file SerializablePathCollection.cpp.

References clang::index::StringPool::add(), and Filename.

Referenced by clang::index::SerializablePathCollection::tryStoreFilePath().

◆ getFilePaths()

llvm::ArrayRef< PathPool::FilePath > PathPool::getFilePaths ( ) const

Definition at line 33 of file SerializablePathCollection.cpp.

◆ getPaths()

StringRef PathPool::getPaths ( ) const

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