mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 17:36:05 +00:00
[clang][modules] Use FileEntryRef
in ModuleMap
(2/2)
This commit is contained in:
parent
12cb98fe04
commit
12866a2b87
@ -516,7 +516,7 @@ public:
|
||||
///
|
||||
/// \return false if \#including the file will have no effect or true
|
||||
/// if we should include it.
|
||||
bool ShouldEnterIncludeFile(Preprocessor &PP, const FileEntry *File,
|
||||
bool ShouldEnterIncludeFile(Preprocessor &PP, FileEntryRef File,
|
||||
bool isImport, bool ModulesEnabled, Module *M,
|
||||
bool &IsFirstIncludeOfFile);
|
||||
|
||||
|
@ -415,7 +415,7 @@ public:
|
||||
}
|
||||
|
||||
/// Is this a compiler builtin header?
|
||||
bool isBuiltinHeader(const FileEntry *File);
|
||||
bool isBuiltinHeader(FileEntryRef File);
|
||||
|
||||
/// Add a module map callback.
|
||||
void addModuleMapCallbacks(std::unique_ptr<ModuleMapCallbacks> Callback) {
|
||||
|
@ -1401,7 +1401,7 @@ void HeaderSearch::MarkFileModuleHeader(const FileEntry *FE,
|
||||
}
|
||||
|
||||
bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
|
||||
const FileEntry *File, bool isImport,
|
||||
FileEntryRef File, bool isImport,
|
||||
bool ModulesEnabled, Module *M,
|
||||
bool &IsFirstIncludeOfFile) {
|
||||
++NumIncluded; // Count # of attempted #includes.
|
||||
|
@ -412,9 +412,9 @@ static StringRef sanitizeFilenameAsIdentifier(StringRef Name,
|
||||
return Name;
|
||||
}
|
||||
|
||||
bool ModuleMap::isBuiltinHeader(const FileEntry *File) {
|
||||
return File->getDir() == BuiltinIncludeDir && LangOpts.BuiltinHeadersInSystemModules &&
|
||||
isBuiltinHeaderName(llvm::sys::path::filename(File->getName()));
|
||||
bool ModuleMap::isBuiltinHeader(FileEntryRef File) {
|
||||
return File.getDir() == BuiltinIncludeDir && LangOpts.BuiltinHeadersInSystemModules &&
|
||||
isBuiltinHeaderName(llvm::sys::path::filename(File.getName()));
|
||||
}
|
||||
|
||||
ModuleMap::HeadersMap::iterator ModuleMap::findKnownHeader(FileEntryRef File) {
|
||||
|
@ -2342,8 +2342,8 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(
|
||||
// Ask HeaderInfo if we should enter this #include file. If not, #including
|
||||
// this file will have no effect.
|
||||
if (Action == Enter && File &&
|
||||
!HeaderInfo.ShouldEnterIncludeFile(*this, &File->getFileEntry(),
|
||||
EnterOnce, getLangOpts().Modules, SM,
|
||||
!HeaderInfo.ShouldEnterIncludeFile(*this, *File, EnterOnce,
|
||||
getLangOpts().Modules, SM,
|
||||
IsFirstIncludeOfFile)) {
|
||||
// C++ standard modules:
|
||||
// If we are not in the GMF, then we textually include only
|
||||
|
Loading…
x
Reference in New Issue
Block a user