clang  14.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::HeaderMapImpl Class Reference

Implementation for HeaderMap that doesn't depend on FileManager. More...

#include "clang/Lex/HeaderMap.h"

Inheritance diagram for clang::HeaderMapImpl:
Inheritance graph
[legend]

Public Member Functions

 HeaderMapImpl (std::unique_ptr< const llvm::MemoryBuffer > File, bool NeedsBSwap)
 
StringRef lookupFilename (StringRef Filename, SmallVectorImpl< char > &DestPath) const
 If the specified relative filename is located in this HeaderMap return the filename it is mapped to, otherwise return an empty StringRef. More...
 
StringRef getFileName () const
 Return the filename of the headermap. More...
 
void dump () const
 Print the contents of this headermap to stderr. More...
 
StringRef reverseLookupFilename (StringRef DestPath) const
 Return key for specifed path. More...
 

Static Public Member Functions

static bool checkHeader (const llvm::MemoryBuffer &File, bool &NeedsByteSwap)
 

Detailed Description

Implementation for HeaderMap that doesn't depend on FileManager.

Definition at line 30 of file HeaderMap.h.

Constructor & Destructor Documentation

◆ HeaderMapImpl()

clang::HeaderMapImpl::HeaderMapImpl ( std::unique_ptr< const llvm::MemoryBuffer >  File,
bool  NeedsBSwap 
)
inline

Definition at line 36 of file HeaderMap.h.

References clang::File.

Member Function Documentation

◆ checkHeader()

bool HeaderMapImpl::checkHeader ( const llvm::MemoryBuffer &  File,
bool NeedsByteSwap 
)
static

◆ dump()

LLVM_DUMP_METHOD void HeaderMapImpl::dump ( ) const

Print the contents of this headermap to stderr.

dump - Print the contents of this headermap to stderr.

Definition at line 172 of file HeaderMap.cpp.

References getFileName(), Id, clang::HMapHeader::NumBuckets, and clang::HMapHeader::NumEntries.

◆ getFileName()

StringRef HeaderMapImpl::getFileName ( ) const

Return the filename of the headermap.

getFileName - Return the filename of the headermap.

Definition at line 109 of file HeaderMap.cpp.

Referenced by dump().

◆ lookupFilename()

StringRef HeaderMapImpl::lookupFilename ( StringRef  Filename,
SmallVectorImpl< char > &  DestPath 
) const

If the specified relative filename is located in this HeaderMap return the filename it is mapped to, otherwise return an empty StringRef.

Definition at line 197 of file HeaderMap.cpp.

References clang::HMapHeader::NumBuckets.

◆ reverseLookupFilename()

StringRef HeaderMapImpl::reverseLookupFilename ( StringRef  DestPath) const

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