clang
6.0.0
|
DirectoryLookup - This class represents one entry in the search list that specifies the search order for directories in #include directives. More...
#include "clang/Lex/DirectoryLookup.h"
Public Types | |
enum | LookupType_t { LT_NormalDir, LT_Framework, LT_HeaderMap } |
Public Member Functions | |
DirectoryLookup (const DirectoryEntry *dir, SrcMgr::CharacteristicKind DT, bool isFramework) | |
DirectoryLookup ctor - Note that this ctor does not take ownership of 'dir'. More... | |
DirectoryLookup (const HeaderMap *map, SrcMgr::CharacteristicKind DT, bool isIndexHeaderMap) | |
DirectoryLookup ctor - Note that this ctor does not take ownership of 'map'. More... | |
LookupType_t | getLookupType () const |
getLookupType - Return the kind of directory lookup that this is: either a normal directory, a framework path, or a HeaderMap. More... | |
StringRef | getName () const |
getName - Return the directory or filename corresponding to this lookup object. More... | |
const DirectoryEntry * | getDir () const |
getDir - Return the directory that this entry refers to. More... | |
const DirectoryEntry * | getFrameworkDir () const |
getFrameworkDir - Return the directory that this framework refers to. More... | |
const HeaderMap * | getHeaderMap () const |
getHeaderMap - Return the directory that this entry refers to. More... | |
bool | isNormalDir () const |
isNormalDir - Return true if this is a normal directory, not a header map. More... | |
bool | isFramework () const |
isFramework - True if this is a framework directory. More... | |
bool | isHeaderMap () const |
isHeaderMap - Return true if this is a header map, not a normal directory. More... | |
bool | haveSearchedAllModuleMaps () const |
Determine whether we have already searched this entire directory for module maps. More... | |
void | setSearchedAllModuleMaps (bool SAMM) |
Specify whether we have already searched all of the subdirectories for module maps. More... | |
SrcMgr::CharacteristicKind | getDirCharacteristic () const |
DirCharacteristic - The type of directory this is, one of the DirType enum values. More... | |
bool | isSystemHeaderDirectory () const |
Whether this describes a system header directory. More... | |
bool | isIndexHeaderMap () const |
Whether this header map is building a framework or not. More... | |
const FileEntry * | LookupFile (StringRef &Filename, HeaderSearch &HS, SourceLocation IncludeLoc, SmallVectorImpl< char > *SearchPath, SmallVectorImpl< char > *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool &InUserSpecifiedSystemFramework, bool &HasBeenMapped, SmallVectorImpl< char > &MappedName) const |
LookupFile - Lookup the specified file in this search path, returning it if it exists or returning null if not. More... | |
DirectoryLookup - This class represents one entry in the search list that specifies the search order for directories in #include directives.
It represents either a directory, a framework, or a headermap.
Definition at line 32 of file DirectoryLookup.h.
Enumerator | |
---|---|
LT_NormalDir | |
LT_Framework | |
LT_HeaderMap |
Definition at line 34 of file DirectoryLookup.h.
|
inline |
DirectoryLookup ctor - Note that this ctor does not take ownership of 'dir'.
Definition at line 68 of file DirectoryLookup.h.
|
inline |
DirectoryLookup ctor - Note that this ctor does not take ownership of 'map'.
Definition at line 78 of file DirectoryLookup.h.
|
inline |
getDir - Return the directory that this entry refers to.
Definition at line 95 of file DirectoryLookup.h.
References isNormalDir().
Referenced by clang::HeaderSearch::loadTopLevelSystemModules().
|
inline |
DirCharacteristic - The type of directory this is, one of the DirType enum values.
Definition at line 133 of file DirectoryLookup.h.
Referenced by isSystemHeaderDirectory(), and clang::HeaderSearch::LookupFile().
|
inline |
getFrameworkDir - Return the directory that this framework refers to.
Definition at line 101 of file DirectoryLookup.h.
References isFramework().
|
inline |
getHeaderMap - Return the directory that this entry refers to.
Definition at line 107 of file DirectoryLookup.h.
References isHeaderMap().
|
inline |
getLookupType - Return the kind of directory lookup that this is: either a normal directory, a framework path, or a HeaderMap.
Definition at line 87 of file DirectoryLookup.h.
References getName().
Referenced by isFramework(), isHeaderMap(), and isNormalDir().
StringRef DirectoryLookup::getName | ( | ) | const |
getName - Return the directory or filename corresponding to this lookup object.
Definition at line 302 of file HeaderSearch.cpp.
Referenced by getLookupType().
|
inline |
Determine whether we have already searched this entire directory for module maps.
Definition at line 123 of file DirectoryLookup.h.
Referenced by clang::HeaderSearch::loadTopLevelSystemModules().
|
inline |
isFramework - True if this is a framework directory.
Definition at line 116 of file DirectoryLookup.h.
References getLookupType(), and LT_Framework.
Referenced by getFrameworkDir(), and clang::HeaderSearch::loadTopLevelSystemModules().
|
inline |
isHeaderMap - Return true if this is a header map, not a normal directory.
Definition at line 119 of file DirectoryLookup.h.
References getLookupType(), and LT_HeaderMap.
Referenced by getHeaderMap(), and isIndexHeaderMap().
|
inline |
Whether this header map is building a framework or not.
Definition at line 143 of file DirectoryLookup.h.
References Filename, isHeaderMap(), and LookupFile().
Referenced by clang::HeaderSearch::LookupFile().
|
inline |
isNormalDir - Return true if this is a normal directory, not a header map.
Definition at line 112 of file DirectoryLookup.h.
References getLookupType(), and LT_NormalDir.
Referenced by getDir().
|
inline |
Whether this describes a system header directory.
Definition at line 138 of file DirectoryLookup.h.
References clang::SrcMgr::C_User, and getDirCharacteristic().
Referenced by clang::HeaderSearch::loadTopLevelSystemModules().
const FileEntry * DirectoryLookup::LookupFile | ( | StringRef & | Filename, |
HeaderSearch & | HS, | ||
SourceLocation | IncludeLoc, | ||
SmallVectorImpl< char > * | SearchPath, | ||
SmallVectorImpl< char > * | RelativePath, | ||
Module * | RequestingModule, | ||
ModuleMap::KnownHeader * | SuggestedModule, | ||
bool & | InUserSpecifiedSystemFramework, | ||
bool & | HasBeenMapped, | ||
SmallVectorImpl< char > & | MappedName | ||
) | const |
LookupFile - Lookup the specified file in this search path, returning it if it exists or returning null if not.
Filename | The file to look up relative to the search paths. | |
HS | The header search instance to search with. | |
IncludeLoc | the source location of the #include or #import directive. | |
SearchPath | If not NULL, will be set to the search path relative to which the file was found. | |
RelativePath | If not NULL, will be set to the path relative to SearchPath at which the file was found. This only differs from the Filename for framework includes. | |
RequestingModule | The module in which the lookup was performed. | |
SuggestedModule | If non-null, and the file found is semantically part of a known module, this will be set to the module that should be imported instead of preprocessing/parsing the file found. | |
[out] | InUserSpecifiedSystemFramework | If the file is found, set to true if the file is located in a framework that has been user-specified to be treated as a system framework. |
[out] | MappedName | if this is a headermap which maps the filename to a framework include ("Foo.h" -> "Foo/Foo.h"), set the new name to this vector and point Filename to it. |
Definition at line 332 of file HeaderSearch.cpp.
References clang::FileManager::getFile(), clang::HeaderSearch::getFileMgr(), clang::HeaderMap::LookupFile(), clang::HeaderMapImpl::lookupFilename(), and clang::Result.
Referenced by isIndexHeaderMap().
|
inline |
Specify whether we have already searched all of the subdirectories for module maps.
Definition at line 127 of file DirectoryLookup.h.
Referenced by clang::HeaderSearch::loadTopLevelSystemModules().
const DirectoryEntry* clang::DirectoryLookup::Dir |
Dir - This is the actual directory that we're referring to for a normal directory or a framework.
Definition at line 43 of file DirectoryLookup.h.
const HeaderMap* clang::DirectoryLookup::Map |
Map - This is the HeaderMap if this is a headermap lookup.
Definition at line 47 of file DirectoryLookup.h.