clang  14.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  RootDirKind { RootDirKind::Regular = 0, RootDirKind::CurrentWorkDir = 1, RootDirKind::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 44 of file SerializablePathCollection.h.

Member Enumeration Documentation

◆ RootDirKind

Special root directory of a filesystem path.

Enumerator
Regular 
CurrentWorkDir 
SysRoot 

Definition at line 47 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.

◆ 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.

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

Definition at line 37 of file SerializablePathCollection.cpp.


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