From 99cfccdcb371cd6769169538098c3c3539cf9498 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 20 Apr 2022 19:02:03 +0200 Subject: [clang][lex] NFCI: Use FileEntryRef in ModuleMap::diagnoseHeaderInclusion() This patch removes uses of the deprecated `DirectoryEntry::getName()` from the `ModuleMap::diagnoseHeaderInclusion()` function by using `{File,Directory}EntryRef` instead. Reviewed By: bnbarham Differential Revision: https://reviews.llvm.org/D123856 --- clang/lib/Lex/ModuleMap.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 75a0e6b..c791e3e 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -473,8 +473,7 @@ static Module *getTopLevelOrNull(Module *M) { void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, bool RequestingModuleIsModuleInterface, SourceLocation FilenameLoc, - StringRef Filename, - const FileEntry *File) { + StringRef Filename, FileEntryRef File) { // No errors for indirect modules. This may be a bit of a problem for modules // with no source files. if (getTopLevelOrNull(RequestingModule) != getTopLevelOrNull(SourceModule)) @@ -542,7 +541,7 @@ void ModuleMap::diagnoseHeaderInclusion(Module *RequestingModule, diag::warn_non_modular_include_in_framework_module : diag::warn_non_modular_include_in_module; Diags.Report(FilenameLoc, DiagID) << RequestingModule->getFullModuleName() - << File->getName(); + << File.getName(); } } -- cgit v1.1