13#ifndef LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
14#define LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
48 DLU(
const HeaderMap *Map) : Map(Map) {}
54 unsigned DirCharacteristic : 3;
59 unsigned LookupType : 2;
62 LLVM_PREFERRED_TYPE(
bool)
63 unsigned IsIndexHeaderMap : 1;
67 LLVM_PREFERRED_TYPE(
bool)
68 unsigned SearchedAllModuleMaps : 1;
74 : u(Dir), DirCharacteristic(DT),
76 IsIndexHeaderMap(
false), SearchedAllModuleMaps(
false) {}
81 : u(Map), DirCharacteristic(DT), LookupType(
LT_HeaderMap),
95 return isNormalDir() ? &u.Dir.getDirEntry() :
nullptr;
105 return isFramework() ? &u.Dir.getDirEntry() :
nullptr;
135 SearchedAllModuleMaps = SAMM;
192 bool &InUserSpecifiedSystemFramework,
bool &IsFrameworkFound,
194 bool OpenFile =
true)
const;
201 bool &InUserSpecifiedSystemFramework,
bool &IsFrameworkFound)
const;
Defines the clang::FileManager interface and associated types.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the SourceManager interface.
A reference to a DirectoryEntry that includes the name of the directory as it was accessed by the Fil...
Cached information about one directory (either on disk or in the virtual file system).
DirectoryLookup - This class represents one entry in the search list that specifies the search order ...
SrcMgr::CharacteristicKind getDirCharacteristic() const
DirCharacteristic - The type of directory this is, one of the DirType enum values.
DirectoryLookup(const HeaderMap *Map, SrcMgr::CharacteristicKind DT, bool isIndexHeaderMap)
This ctor does not take ownership of 'Map'.
const DirectoryEntry * getFrameworkDir() const
getFrameworkDir - Return the directory that this framework refers to.
OptionalFileEntryRef LookupFile(StringRef &Filename, HeaderSearch &HS, SourceLocation IncludeLoc, SmallVectorImpl< char > *SearchPath, SmallVectorImpl< char > *RelativePath, Module *RequestingModule, ModuleMap::KnownHeader *SuggestedModule, bool &InUserSpecifiedSystemFramework, bool &IsFrameworkFound, bool &IsInHeaderMap, SmallVectorImpl< char > &MappedName, bool OpenFile=true) const
LookupFile - Lookup the specified file in this search path, returning it if it exists or returning nu...
bool isFramework() const
isFramework - True if this is a framework directory.
bool isSystemHeaderDirectory() const
Whether this describes a system header directory.
bool isIndexHeaderMap() const
Whether this header map is building a framework or not.
OptionalDirectoryEntryRef getFrameworkDirRef() const
void setSearchedAllModuleMaps(bool SAMM)
Specify whether we have already searched all of the subdirectories for module maps.
DirectoryLookup(DirectoryEntryRef Dir, SrcMgr::CharacteristicKind DT, bool isFramework)
This ctor does not take ownership of 'Dir'.
bool isHeaderMap() const
isHeaderMap - Return true if this is a header map, not a normal directory.
StringRef getName() const
getName - Return the directory or filename corresponding to this lookup object.
LookupType_t getLookupType() const
getLookupType - Return the kind of directory lookup that this is: either a normal directory,...
OptionalDirectoryEntryRef getDirRef() const
bool haveSearchedAllModuleMaps() const
Determine whether we have already searched this entire directory for module maps.
const DirectoryEntry * getDir() const
getDir - Return the directory that this entry refers to.
bool isNormalDir() const
isNormalDir - Return true if this is a normal directory, not a header map.
const HeaderMap * getHeaderMap() const
getHeaderMap - Return the directory that this entry refers to.
Describes a module or submodule.
Encodes a location in the source.
CharacteristicKind
Indicates whether a file or directory holds normal user code, system code, or system code which is im...
The JSON file list parser is used to communicate input to InstallAPI.
CustomizableOptional< DirectoryEntryRef > OptionalDirectoryEntryRef
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...