clang
10.0.0git
|
Implementation for HeaderMap that doesn't depend on FileManager. More...
#include "clang/Lex/HeaderMap.h"
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... | |
Static Public Member Functions | |
static bool | checkHeader (const llvm::MemoryBuffer &File, bool &NeedsByteSwap) |
Implementation for HeaderMap that doesn't depend on FileManager.
Definition at line 29 of file HeaderMap.h.
|
inline |
Definition at line 34 of file HeaderMap.h.
References checkHeader(), dump(), Filename, getFileName(), lookupFilename(), and X.
Definition at line 65 of file HeaderMap.cpp.
References clang::HMAP_HeaderMagicNumber, clang::HMAP_HeaderVersion, clang::HMapHeader::Magic, clang::HMapHeader::NumBuckets, clang::HMapHeader::Reserved, and clang::HMapHeader::Version.
Referenced by clang::HeaderMap::Create(), and HeaderMapImpl().
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.
Referenced by HeaderMapImpl().
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.
References clang::HMAP_EmptyBucketKey, clang::HMapBucket::Key, clang::None, clang::HMapBucket::Prefix, clang::Result, clang::HMapBucket::Suffix, and X.
Referenced by dump(), and HeaderMapImpl().
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 210 of file HeaderMap.cpp.
References clang::HMapHeader::NumBuckets.
Referenced by HeaderMapImpl(), clang::HeaderMap::LookupFile(), and clang::DirectoryLookup::LookupFile().