clang: include/clang/Lex/DirectoryLookup.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
14#define LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
15
20
25
26
27
28
29
31public:
37private:
38 union DLU {
39
40
42
43
44
46
48 DLU(const HeaderMap *Map) : Map(Map) {}
49 } u;
50
51
52
54 unsigned DirCharacteristic : 3;
55
56
57
59 unsigned LookupType : 2;
60
61
62
63 LLVM_PREFERRED_TYPE(bool)
64 unsigned SearchedAllModuleMaps : 1;
65
66public:
67
70 : u(Dir), DirCharacteristic(DT),
72 SearchedAllModuleMaps(false) {}
73
74
76 : u(Map), DirCharacteristic(DT), LookupType(LT_HeaderMap),
77 SearchedAllModuleMaps(false) {}
78
79
80
82
83
84
85 StringRef getName() const;
86
87
88
90 return isNormalDir() ? &u.Dir.getDirEntry() : nullptr;
91 }
92
96
97
98
100 return isFramework() ? &u.Dir.getDirEntry() : nullptr;
101 }
102
106
107
108
112
113
115
116
117
119
120
122
123
124
126
127
128
130 SearchedAllModuleMaps = SAMM;
131 }
132
133
134
138
139
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
182 bool &InUserSpecifiedSystemFramework, bool &IsFrameworkFound,
184 bool OpenFile = true) const;
185
186private:
191 bool &InUserSpecifiedSystemFramework, bool &IsFrameworkFound) const;
192};
193
194}
195
196#endif
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.
Definition DirectoryLookup.h:135
const DirectoryEntry * getFrameworkDir() const
getFrameworkDir - Return the directory that this framework refers to.
Definition DirectoryLookup.h:99
LookupType_t
Definition DirectoryLookup.h:32
@ LT_HeaderMap
Definition DirectoryLookup.h:35
@ LT_NormalDir
Definition DirectoryLookup.h:33
@ LT_Framework
Definition DirectoryLookup.h:34
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.
Definition DirectoryLookup.h:118
bool isSystemHeaderDirectory() const
Whether this describes a system header directory.
Definition DirectoryLookup.h:140
OptionalDirectoryEntryRef getFrameworkDirRef() const
Definition DirectoryLookup.h:103
void setSearchedAllModuleMaps(bool SAMM)
Specify whether we have already searched all of the subdirectories for module maps.
Definition DirectoryLookup.h:129
DirectoryLookup(DirectoryEntryRef Dir, SrcMgr::CharacteristicKind DT, bool isFramework)
This ctor does not take ownership of 'Dir'.
Definition DirectoryLookup.h:68
bool isHeaderMap() const
isHeaderMap - Return true if this is a header map, not a normal directory.
Definition DirectoryLookup.h:121
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,...
Definition DirectoryLookup.h:81
OptionalDirectoryEntryRef getDirRef() const
Definition DirectoryLookup.h:93
bool haveSearchedAllModuleMaps() const
Determine whether we have already searched this entire directory for module maps.
Definition DirectoryLookup.h:125
DirectoryLookup(const HeaderMap *Map, SrcMgr::CharacteristicKind DT)
This ctor does not take ownership of 'Map'.
Definition DirectoryLookup.h:75
const DirectoryEntry * getDir() const
getDir - Return the directory that this entry refers to.
Definition DirectoryLookup.h:89
bool isNormalDir() const
isNormalDir - Return true if this is a normal directory, not a header map.
Definition DirectoryLookup.h:114
const HeaderMap * getHeaderMap() const
getHeaderMap - Return the directory that this entry refers to.
Definition DirectoryLookup.h:109
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< FileEntryRef > OptionalFileEntryRef
CustomizableOptional< DirectoryEntryRef > OptionalDirectoryEntryRef