clang 20.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) | |
template<typename Func > | |
void | forEachKey (Func Callback) const |
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. | |
StringRef | getFileName () const |
Return the filename of the headermap. | |
void | dump () const |
Print the contents of this headermap to stderr. | |
StringRef | reverseLookupFilename (StringRef DestPath) const |
Return key for specifed path. | |
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 31 of file HeaderMap.h.
|
inline |
Definition at line 37 of file HeaderMap.h.
Definition at line 66 of file HeaderMap.cpp.
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(), clang::HMAP_EmptyBucketKey, Id, clang::HMapBucket::Key, clang::HMapHeader::NumBuckets, clang::HMapHeader::NumEntries, clang::HMapBucket::Prefix, and clang::HMapBucket::Suffix.
Definition at line 44 of file HeaderMap.h.
References clang::HMAP_EmptyBucketKey, clang::HMapBucket::Key, and clang::HMapHeader::NumBuckets.
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().
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 Filename, HashHMapKey(), clang::HMAP_EmptyBucketKey, clang::HMapBucket::Key, clang::HMapHeader::NumBuckets, clang::HMapBucket::Prefix, and clang::HMapBucket::Suffix.
StringRef HeaderMapImpl::reverseLookupFilename | ( | StringRef | DestPath | ) | const |
Return key for specifed path.
Definition at line 231 of file HeaderMap.cpp.
References clang::HMAP_EmptyBucketKey, clang::HMapBucket::Key, clang::HMapHeader::NumBuckets, clang::HMapBucket::Prefix, and clang::HMapBucket::Suffix.