class DirectoryLookup
Declaration
class DirectoryLookup { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:30
Member Variables
- private union DLU u
- private unsigned int DirCharacteristic
- DirCharacteristic - The type of directory this is: this is an instance of SrcMgr::CharacteristicKind.
- private unsigned int LookupType
- LookupType - This indicates whether this DirectoryLookup object is a normal directory, a framework, or a headermap.
- private unsigned int IsIndexHeaderMap
- Whether this is a header map used when building a framework.
- private unsigned int SearchedAllModuleMaps
- Whether we've performed an exhaustive search for module maps within the subdirectories of this directory.
Method Overview
- public DirectoryLookup(const clang::HeaderMap * Map, SrcMgr::CharacteristicKind DT, bool isIndexHeaderMap)
- public DirectoryLookup(clang::DirectoryEntryRef Dir, SrcMgr::CharacteristicKind DT, bool isFramework)
- private Optional<clang::FileEntryRef> DoFrameworkLookup(llvm::StringRef Filename, clang::HeaderSearch & HS, SmallVectorImpl<char> * SearchPath, SmallVectorImpl<char> * RelativePath, clang::Module * RequestingModule, ModuleMap::KnownHeader * SuggestedModule, bool & InUserSpecifiedSystemFramework, bool & IsFrameworkFound) const
- public Optional<clang::FileEntryRef> LookupFile(llvm::StringRef & Filename, clang::HeaderSearch & HS, clang::SourceLocation IncludeLoc, SmallVectorImpl<char> * SearchPath, SmallVectorImpl<char> * RelativePath, clang::Module * RequestingModule, ModuleMap::KnownHeader * SuggestedModule, bool & InUserSpecifiedSystemFramework, bool & IsFrameworkFound, bool & IsInHeaderMap, SmallVectorImpl<char> & MappedName) const
- public const clang::DirectoryEntry * getDir() const
- public SrcMgr::CharacteristicKind getDirCharacteristic() const
- public Optional<clang::DirectoryEntryRef> getDirRef() const
- public const clang::DirectoryEntry * getFrameworkDir() const
- public Optional<clang::DirectoryEntryRef> getFrameworkDirRef() const
- public const clang::HeaderMap * getHeaderMap() const
- public clang::DirectoryLookup::LookupType_t getLookupType() const
- public llvm::StringRef getName() const
- public bool haveSearchedAllModuleMaps() const
- public bool isFramework() const
- public bool isHeaderMap() const
- public bool isIndexHeaderMap() const
- public bool isNormalDir() const
- public bool isSystemHeaderDirectory() const
- public void setSearchedAllModuleMaps(bool SAMM)
Methods
¶DirectoryLookup(const clang::HeaderMap* Map,
SrcMgr::CharacteristicKind DT,
bool isIndexHeaderMap)
DirectoryLookup(const clang::HeaderMap* Map,
SrcMgr::CharacteristicKind DT,
bool isIndexHeaderMap)
Description
This ctor *does not take ownership* of 'Map'.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:75
Parameters
- const clang::HeaderMap* Map
- SrcMgr::CharacteristicKind DT
- bool isIndexHeaderMap
¶DirectoryLookup(clang::DirectoryEntryRef Dir,
SrcMgr::CharacteristicKind DT,
bool isFramework)
DirectoryLookup(clang::DirectoryEntryRef Dir,
SrcMgr::CharacteristicKind DT,
bool isFramework)
Description
This ctor *does not take ownership* of 'Dir'.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:68
Parameters
- clang::DirectoryEntryRef Dir
- SrcMgr::CharacteristicKind DT
- bool isFramework
¶Optional<clang::FileEntryRef> DoFrameworkLookup(
llvm::StringRef Filename,
clang::HeaderSearch& HS,
SmallVectorImpl<char>* SearchPath,
SmallVectorImpl<char>* RelativePath,
clang::Module* RequestingModule,
ModuleMap::KnownHeader* SuggestedModule,
bool& InUserSpecifiedSystemFramework,
bool& IsFrameworkFound) const
Optional<clang::FileEntryRef> DoFrameworkLookup(
llvm::StringRef Filename,
clang::HeaderSearch& HS,
SmallVectorImpl<char>* SearchPath,
SmallVectorImpl<char>* RelativePath,
clang::Module* RequestingModule,
ModuleMap::KnownHeader* SuggestedModule,
bool& InUserSpecifiedSystemFramework,
bool& IsFrameworkFound) const
Declared at: clang/include/clang/Lex/DirectoryLookup.h:192
Parameters
- llvm::StringRef Filename
- clang::HeaderSearch& HS
- SmallVectorImpl<char>* SearchPath
- SmallVectorImpl<char>* RelativePath
- clang::Module* RequestingModule
- ModuleMap::KnownHeader* SuggestedModule
- bool& InUserSpecifiedSystemFramework
- bool& IsFrameworkFound
¶Optional<clang::FileEntryRef> LookupFile(
llvm::StringRef& Filename,
clang::HeaderSearch& HS,
clang::SourceLocation IncludeLoc,
SmallVectorImpl<char>* SearchPath,
SmallVectorImpl<char>* RelativePath,
clang::Module* RequestingModule,
ModuleMap::KnownHeader* SuggestedModule,
bool& InUserSpecifiedSystemFramework,
bool& IsFrameworkFound,
bool& IsInHeaderMap,
SmallVectorImpl<char>& MappedName) const
Optional<clang::FileEntryRef> LookupFile(
llvm::StringRef& Filename,
clang::HeaderSearch& HS,
clang::SourceLocation IncludeLoc,
SmallVectorImpl<char>* SearchPath,
SmallVectorImpl<char>* RelativePath,
clang::Module* RequestingModule,
ModuleMap::KnownHeader* SuggestedModule,
bool& InUserSpecifiedSystemFramework,
bool& IsFrameworkFound,
bool& IsInHeaderMap,
SmallVectorImpl<char>& MappedName) const
Description
LookupFile - Lookup the specified file in this search path, returning it if it exists or returning null if not.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:184
Parameters
- llvm::StringRef& Filename
- The file to look up relative to the search paths.
- clang::HeaderSearch& HS
- The header search instance to search with.
- clang::SourceLocation IncludeLoc
- the source location of the #include or #import directive.
- SmallVectorImpl<char>* SearchPath
- If not NULL, will be set to the search path relative to which the file was found.
- SmallVectorImpl<char>* 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.
- clang::Module* RequestingModule
- The module in which the lookup was performed.
- ModuleMap::KnownHeader* 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.
- bool& 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.
- bool& IsFrameworkFound
- For a framework directory set to true if specified '.framework' directory is found.
- bool& IsInHeaderMap
- SmallVectorImpl<char>& 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.
¶const clang::DirectoryEntry* getDir() const
const clang::DirectoryEntry* getDir() const
Description
getDir - Return the directory that this entry refers to.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:90
¶SrcMgr::CharacteristicKind getDirCharacteristic()
const
SrcMgr::CharacteristicKind getDirCharacteristic()
const
Description
DirCharacteristic - The type of directory this is, one of the DirType enum values.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:136
¶Optional<clang::DirectoryEntryRef> getDirRef()
const
Optional<clang::DirectoryEntryRef> getDirRef()
const
Declared at: clang/include/clang/Lex/DirectoryLookup.h:94
¶const clang::DirectoryEntry* getFrameworkDir()
const
const clang::DirectoryEntry* getFrameworkDir()
const
Description
getFrameworkDir - Return the directory that this framework refers to.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:100
¶Optional<clang::DirectoryEntryRef>
getFrameworkDirRef() const
Optional<clang::DirectoryEntryRef>
getFrameworkDirRef() const
Declared at: clang/include/clang/Lex/DirectoryLookup.h:104
¶const clang::HeaderMap* getHeaderMap() const
const clang::HeaderMap* getHeaderMap() const
Description
getHeaderMap - Return the directory that this entry refers to.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:110
¶clang::DirectoryLookup::LookupType_t
getLookupType() const
clang::DirectoryLookup::LookupType_t
getLookupType() const
Description
getLookupType - Return the kind of directory lookup that this is: either a normal directory, a framework path, or a HeaderMap.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:82
¶llvm::StringRef getName() const
llvm::StringRef getName() const
Description
getName - Return the directory or filename corresponding to this lookup object.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:86
¶bool haveSearchedAllModuleMaps() const
bool haveSearchedAllModuleMaps() const
Description
Determine whether we have already searched this entire directory for module maps.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:126
¶bool isFramework() const
bool isFramework() const
Description
isFramework - True if this is a framework directory.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:119
¶bool isHeaderMap() const
bool isHeaderMap() const
Description
isHeaderMap - Return true if this is a header map, not a normal directory.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:122
¶bool isIndexHeaderMap() const
bool isIndexHeaderMap() const
Description
Whether this header map is building a framework or not.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:146
¶bool isNormalDir() const
bool isNormalDir() const
Description
isNormalDir - Return true if this is a normal directory, not a header map.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:115
¶bool isSystemHeaderDirectory() const
bool isSystemHeaderDirectory() const
Description
Whether this describes a system header directory.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:141
¶void setSearchedAllModuleMaps(bool SAMM)
void setSearchedAllModuleMaps(bool SAMM)
Description
Specify whether we have already searched all of the subdirectories for module maps.
Declared at: clang/include/clang/Lex/DirectoryLookup.h:130
Parameters
- bool SAMM