Skip to content

Commit e644f59

Browse files
committed
[clang] NFCI: Use FileEntryRef in ModuleMapCallbacks
1 parent 14498a4 commit e644f59

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clang/include/clang/Lex/ModuleMap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class ModuleMapCallbacks {
5757
/// contents.
5858
/// \param File The file itself.
5959
/// \param IsSystem Whether this is a module map from a system include path.
60-
virtual void moduleMapFileRead(SourceLocation FileStart,
61-
const FileEntry &File, bool IsSystem) {}
60+
virtual void moduleMapFileRead(SourceLocation FileStart, FileEntryRef File,
61+
bool IsSystem) {}
6262

6363
/// Called when a header is added during module map parsing.
6464
///

clang/lib/Frontend/DependencyFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct DepCollectorMMCallbacks : public ModuleMapCallbacks {
105105
DependencyCollector &DepCollector;
106106
DepCollectorMMCallbacks(DependencyCollector &DC) : DepCollector(DC) {}
107107

108-
void moduleMapFileRead(SourceLocation Loc, const FileEntry &Entry,
108+
void moduleMapFileRead(SourceLocation Loc, FileEntryRef Entry,
109109
bool IsSystem) override {
110110
StringRef Filename = Entry.getName();
111111
DepCollector.maybeAddDependency(Filename,

clang/lib/Lex/ModuleMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ bool ModuleMap::parseModuleMapFile(FileEntryRef File, bool IsSystem,
31203120

31213121
// Notify callbacks that we parsed it.
31223122
for (const auto &Cb : Callbacks)
3123-
Cb->moduleMapFileRead(Start, *File, IsSystem);
3123+
Cb->moduleMapFileRead(Start, File, IsSystem);
31243124

31253125
return Result;
31263126
}

0 commit comments

Comments
 (0)