From 1dee56aed7357ad87e7b30316554b760c75d5779 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 15 Jun 2023 11:09:02 +0200 Subject: [clang] NFC: Use `DirectoryEntryRef` in `FileManager::getCanonicalName()` This patch removes the last use of deprecated `DirectoryEntry::getName()`. Depends on D151855. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D151922 --- clang/lib/Lex/ModuleMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 56329410..cf546c4 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -1319,9 +1319,9 @@ ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl &Path) { } FileManager &FM = SourceMgr.getFileManager(); - auto DirEntry = FM.getDirectory(Dir.empty() ? "." : Dir); + auto DirEntry = FM.getDirectoryRef(Dir.empty() ? "." : Dir); if (!DirEntry) - return DirEntry.getError(); + return llvm::errorToErrorCode(DirEntry.takeError()); // Canonicalize the directory. StringRef CanonicalDir = FM.getCanonicalName(*DirEntry); -- cgit v1.1