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;
63 LLVM_PREFERRED_TYPE(
bool)
64 unsigned LoadedAllModuleMaps : 1;
70 : u(Dir), DirCharacteristic(DT),
72 LoadedAllModuleMaps(
false) {}
76 : u(Map), DirCharacteristic(DT), LookupType(
LT_HeaderMap),
77 LoadedAllModuleMaps(
false) {}
90 return isNormalDir() ? &u.Dir.getDirEntry() :
nullptr;
100 return isFramework() ? &u.Dir.getDirEntry() :
nullptr;
180 bool &InUserSpecifiedSystemFramework,
bool &IsFrameworkFound,
182 bool OpenFile =
true)
const;
189 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).
SrcMgr::CharacteristicKind getDirCharacteristic() const
DirCharacteristic - The type of directory this is, one of the DirType enum values.
const DirectoryEntry * getFrameworkDir() const
getFrameworkDir - Return the directory that this framework refers to.
bool haveLoadedAllModuleMaps() const
Determine whether we have already searched and loaded all of the module maps within this entire direc...
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...
void setLoadedAllModuleMaps(bool LAMM)
Specify whether we have already loaded all of the module maps within the subdirectories of this direc...
bool isFramework() const
isFramework - True if this is a framework directory.
bool isSystemHeaderDirectory() const
Whether this describes a system header directory.
OptionalDirectoryEntryRef getFrameworkDirRef() const
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
DirectoryLookup(const HeaderMap *Map, SrcMgr::CharacteristicKind DT)
This ctor does not take ownership of 'Map'.
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...
Top level wrappers for InstallAPI frontend operations.
CustomizableOptional< FileEntryRef > OptionalFileEntryRef
CustomizableOptional< DirectoryEntryRef > OptionalDirectoryEntryRef