clang-tools 20.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
clang::clangd::IncludeStructure Class Reference

#include <Headers.h>

Classes

class  RecordHeaders
 

Public Types

enum class  HeaderID : unsigned
 

Public Member Functions

 IncludeStructure ()
 
void collect (const CompilerInstance &CI)
 
std::optional< HeaderIDgetID (const FileEntry *Entry) const
 
HeaderID getOrCreateID (FileEntryRef Entry)
 
StringRef getRealPath (HeaderID ID) const
 
llvm::ArrayRef< std::string > allHeaders () const
 
llvm::SmallVector< const Inclusion * > mainFileIncludesWithSpelling (llvm::StringRef Spelling) const
 
llvm::DenseMap< HeaderID, unsigned > includeDepth (HeaderID Root=MainFileID) const
 

Public Attributes

llvm::DenseMap< HeaderID, SmallVector< HeaderID > > IncludeChildren
 
llvm::DenseMap< tooling::stdlib::Header, llvm::SmallVector< HeaderID > > StdlibHeaders
 
std::vector< InclusionMainFileIncludes
 
std::vector< std::string > SearchPathsCanonical
 

Static Public Attributes

static const HeaderID MainFileID = HeaderID(0u)
 

Detailed Description

Definition at line 128 of file Headers.h.

Member Enumeration Documentation

◆ HeaderID

enum class clang::clangd::IncludeStructure::HeaderID : unsigned
strong

Definition at line 143 of file Headers.h.

Constructor & Destructor Documentation

◆ IncludeStructure()

clang::clangd::IncludeStructure::IncludeStructure ( )
inline

Definition at line 130 of file Headers.h.

Member Function Documentation

◆ allHeaders()

llvm::ArrayRef< std::string > clang::clangd::IncludeStructure::allHeaders ( ) const
inline

Definition at line 154 of file Headers.h.

◆ collect()

void clang::clangd::IncludeStructure::collect ( const CompilerInstance &  CI)

Definition at line 178 of file Headers.cpp.

References CI, Dir, and SearchPathsCanonical.

◆ getID()

std::optional< IncludeStructure::HeaderID > clang::clangd::IncludeStructure::getID ( const FileEntry *  Entry) const

Definition at line 197 of file Headers.cpp.

◆ getOrCreateID()

IncludeStructure::HeaderID clang::clangd::IncludeStructure::getOrCreateID ( FileEntryRef  Entry)

◆ getRealPath()

StringRef clang::clangd::IncludeStructure::getRealPath ( HeaderID  ID) const
inline

Definition at line 148 of file Headers.h.

References ID.

◆ includeDepth()

llvm::DenseMap< IncludeStructure::HeaderID, unsigned > clang::clangd::IncludeStructure::includeDepth ( HeaderID  Root = MainFileID) const

Definition at line 228 of file Headers.cpp.

References IncludeChildren, Parent, and Root.

◆ mainFileIncludesWithSpelling()

llvm::SmallVector< const Inclusion * > clang::clangd::IncludeStructure::mainFileIncludesWithSpelling ( llvm::StringRef  Spelling) const

Definition at line 256 of file Headers.cpp.

References MainFileIncludes.

Member Data Documentation

◆ IncludeChildren

llvm::DenseMap<HeaderID, SmallVector<HeaderID> > clang::clangd::IncludeStructure::IncludeChildren

◆ MainFileID

const HeaderID clang::clangd::IncludeStructure::MainFileID = HeaderID(0u)
static

Definition at line 184 of file Headers.h.

Referenced by getOrCreateID().

◆ MainFileIncludes

std::vector<Inclusion> clang::clangd::IncludeStructure::MainFileIncludes

◆ SearchPathsCanonical

std::vector<std::string> clang::clangd::IncludeStructure::SearchPathsCanonical

Definition at line 179 of file Headers.h.

Referenced by collect().

◆ StdlibHeaders

llvm::DenseMap<tooling::stdlib::Header, llvm::SmallVector<HeaderID> > clang::clangd::IncludeStructure::StdlibHeaders

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