clang API Documentation
#include <HeaderMap.h>
Public Member Functions | |
| ~HeaderMap () | |
| const FileEntry * | LookupFile (StringRef Filename, FileManager &FM) const |
| const char * | getFileName () const |
| getFileName - Return the filename of the headermap. | |
| void | dump () const |
| dump - Print the contents of this headermap to stderr. | |
Static Public Member Functions | |
| static const HeaderMap * | Create (const FileEntry *FE, FileManager &FM) |
This class represents an Apple concept known as a 'header map'. To the #include file resolution process, it basically acts like a directory of symlinks to files. Its advantages are that it is dense and more efficient to create and process than a directory of symlinks.
Definition at line 32 of file HeaderMap.h.
| HeaderMap::~HeaderMap | ( | ) |
Definition at line 109 of file HeaderMap.cpp.
| const HeaderMap * HeaderMap::Create | ( | const FileEntry * | FE, |
| FileManager & | FM | ||
| ) | [static] |
HeaderMap::Create - This attempts to load the specified file as a header map. If it doesn't look like a HeaderMap, it gives up and returns null.
HeaderMap::Create - This attempts to load the specified file as a header map. If it doesn't look like a HeaderMap, it gives up and returns null. If it looks like a HeaderMap but is obviously corrupted, it puts a reason into the string error argument and returns null.
Definition at line 79 of file HeaderMap.cpp.
References clang::FileManager::getBufferForFile(), clang::FileEntry::getSize(), HMAP_HeaderMagicNumber, HMAP_HeaderVersion, clang::HMapHeader::Magic, clang::HMapHeader::Reserved, and clang::HMapHeader::Version.
Referenced by clang::HeaderSearch::CreateHeaderMap().
| void HeaderMap::dump | ( | ) | const |
dump - Print the contents of this headermap to stderr.
Definition at line 181 of file HeaderMap.cpp.
References getFileName(), HMAP_EmptyBucketKey, clang::HMapBucket::Key, clang::HMapHeader::NumBuckets, clang::HMapHeader::NumEntries, clang::HMapBucket::Prefix, and clang::HMapBucket::Suffix.
| const char * HeaderMap::getFileName | ( | ) | const |
getFileName - Return the filename of the headermap.
Definition at line 119 of file HeaderMap.cpp.
Referenced by dump(), and clang::DirectoryLookup::getName().
| const FileEntry * HeaderMap::LookupFile | ( | StringRef | Filename, |
| FileManager & | FM | ||
| ) | const |
LookupFile - Check to see if the specified relative filename is located in this HeaderMap. If so, open it and return its FileEntry. If RawPath is not NULL and the file is found, RawPath will be set to the raw path at which the file was found in the file system. For example, for a search path ".." and a filename "../file.h" this would be "../../file.h".
LookupFile - Check to see if the specified relative filename is located in this HeaderMap. If so, open it and return its FileEntry.
Definition at line 202 of file HeaderMap.cpp.
References clang::FileManager::getFile(), HashHMapKey(), HMAP_EmptyBucketKey, clang::HMapBucket::Key, clang::HMapHeader::NumBuckets, clang::HMapBucket::Prefix, and clang::HMapBucket::Suffix.
Referenced by clang::DirectoryLookup::LookupFile().