From b1aea98cfa357e23f4bb52232da5f41781f23bff Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 25 Sep 2024 10:36:44 -0700 Subject: [clang] Make deprecations of some `FileManager` APIs formal (#110014) Some `FileManager` APIs still return `{File,Directory}Entry` instead of the preferred `{File,Directory}EntryRef`. These are documented to be deprecated, but don't have the attribute that warns on their usage. This PR marks them as such with `LLVM_DEPRECATED()` and replaces their usage with the recommended counterparts. NFCI. --- clang/lib/Lex/ModuleMap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index eed7eca..2aada51 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -1144,7 +1144,8 @@ Module *ModuleMap::inferFrameworkModule(DirectoryEntryRef FrameworkDir, if (SubframeworkDirName.empty()) break; - if (auto SubDir = FileMgr.getDirectory(SubframeworkDirName)) { + if (auto SubDir = + FileMgr.getOptionalDirectoryRef(SubframeworkDirName)) { if (*SubDir == FrameworkDir) { FoundParent = true; break; -- cgit v1.1