[clang] e644f59 - [clang] NFCI: Use `FileEntryRef` in `ModuleMapCallbacks`
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 9 22:31:56 PDT 2023
Author: Jan Svoboda
Date: 2023-09-09T21:51:04-07:00
New Revision: e644f5973b0b71baadc6d7b64596527a1dc49d17
URL: https://github.com/llvm/llvm-project/commit/e644f5973b0b71baadc6d7b64596527a1dc49d17
DIFF: https://github.com/llvm/llvm-project/commit/e644f5973b0b71baadc6d7b64596527a1dc49d17.diff
LOG: [clang] NFCI: Use `FileEntryRef` in `ModuleMapCallbacks`
Added:
Modified:
clang/include/clang/Lex/ModuleMap.h
clang/lib/Frontend/DependencyFile.cpp
clang/lib/Lex/ModuleMap.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Lex/ModuleMap.h b/clang/include/clang/Lex/ModuleMap.h
index a25a790e544e238..0da1cdc97a75cc6 100644
--- a/clang/include/clang/Lex/ModuleMap.h
+++ b/clang/include/clang/Lex/ModuleMap.h
@@ -57,8 +57,8 @@ class ModuleMapCallbacks {
/// contents.
/// \param File The file itself.
/// \param IsSystem Whether this is a module map from a system include path.
- virtual void moduleMapFileRead(SourceLocation FileStart,
- const FileEntry &File, bool IsSystem) {}
+ virtual void moduleMapFileRead(SourceLocation FileStart, FileEntryRef File,
+ bool IsSystem) {}
/// Called when a header is added during module map parsing.
///
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp
index 44268e71dc241b6..1140c09dbb985b6 100644
--- a/clang/lib/Frontend/DependencyFile.cpp
+++ b/clang/lib/Frontend/DependencyFile.cpp
@@ -105,7 +105,7 @@ struct DepCollectorMMCallbacks : public ModuleMapCallbacks {
DependencyCollector &DepCollector;
DepCollectorMMCallbacks(DependencyCollector &DC) : DepCollector(DC) {}
- void moduleMapFileRead(SourceLocation Loc, const FileEntry &Entry,
+ void moduleMapFileRead(SourceLocation Loc, FileEntryRef Entry,
bool IsSystem) override {
StringRef Filename = Entry.getName();
DepCollector.maybeAddDependency(Filename,
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 39af2e8df106a66..b4483cd1a55c469 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -3120,7 +3120,7 @@ bool ModuleMap::parseModuleMapFile(FileEntryRef File, bool IsSystem,
// Notify callbacks that we parsed it.
for (const auto &Cb : Callbacks)
- Cb->moduleMapFileRead(Start, *File, IsSystem);
+ Cb->moduleMapFileRead(Start, File, IsSystem);
return Result;
}
More information about the cfe-commits
mailing list