diff --git a/clang/include/clang/Lex/ModuleMap.h b/clang/include/clang/Lex/ModuleMap.h index a25a790e544e2..0da1cdc97a75c 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 44268e71dc241..1140c09dbb985 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 39af2e8df106a..b4483cd1a55c4 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; }