class HeaderMapImpl

Declaration

class HeaderMapImpl { /* full declaration omitted */ };

Description

Implementation for \a HeaderMap that doesn't depend on \a FileManager.

Declared at: clang/include/clang/Lex/HeaderMap.h:30

Member Variables

private std::unique_ptr<const llvm::MemoryBuffer> FileBuffer
private bool NeedsBSwap
private llvm::StringMap<StringRef> ReverseMap

Method Overview

  • public HeaderMapImpl(std::unique_ptr<const llvm::MemoryBuffer> File, bool NeedsBSwap)
  • public static bool checkHeader(const llvm::MemoryBuffer & File, bool & NeedsByteSwap)
  • public void dump() const
  • private clang::HMapBucket getBucket(unsigned int BucketNo) const
  • private unsigned int getEndianAdjustedWord(unsigned int X) const
  • public llvm::StringRef getFileName() const
  • private const clang::HMapHeader & getHeader() const
  • private Optional<llvm::StringRef> getString(unsigned int StrTabIdx) const
  • public llvm::StringRef lookupFilename(llvm::StringRef Filename, SmallVectorImpl<char> & DestPath) const
  • public llvm::StringRef reverseLookupFilename(llvm::StringRef DestPath) const

Methods

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

Declared at: clang/include/clang/Lex/HeaderMap.h:36

Parameters

std::unique_ptr<const llvm::MemoryBuffer> File
bool NeedsBSwap

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

Declared at: clang/include/clang/Lex/HeaderMap.h:40

Parameters

const llvm::MemoryBuffer& File
bool& NeedsByteSwap

void dump() const

Description

Print the contents of this headermap to stderr.

Declared at: clang/include/clang/Lex/HeaderMap.h:51

clang::HMapBucket getBucket(
    unsigned int BucketNo) const

Declared at: clang/include/clang/Lex/HeaderMap.h:59

Parameters

unsigned int BucketNo

unsigned int getEndianAdjustedWord(
    unsigned int X) const

Declared at: clang/include/clang/Lex/HeaderMap.h:57

Parameters

unsigned int X

llvm::StringRef getFileName() const

Description

Return the filename of the headermap.

Declared at: clang/include/clang/Lex/HeaderMap.h:48

const clang::HMapHeader& getHeader() const

Declared at: clang/include/clang/Lex/HeaderMap.h:58

Optional<llvm::StringRef> getString(
    unsigned int StrTabIdx) const

Description

Look up the specified string in the string table. If the string index is not valid, return None.

Declared at: clang/include/clang/Lex/HeaderMap.h:63

Parameters

unsigned int StrTabIdx

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

Description

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

Declared at: clang/include/clang/Lex/HeaderMap.h:44

Parameters

llvm::StringRef Filename
SmallVectorImpl<char>& DestPath

llvm::StringRef reverseLookupFilename(
    llvm::StringRef DestPath) const

Description

Return key for specifed path.

Declared at: clang/include/clang/Lex/HeaderMap.h:54

Parameters

llvm::StringRef DestPath