aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-06-15 11:09:02 +0200
committerJan Svoboda <jan_svoboda@apple.com>2023-06-15 11:22:31 +0200
commit1dee56aed7357ad87e7b30316554b760c75d5779 (patch)
treec714be55632a5eceb4001f3d9ecbbcf24df9cfee /clang/lib/Lex/ModuleMap.cpp
parent7bca6f452f53a4a8d31a56b480e5b9fbaabad4fb (diff)
downloadllvm-1dee56aed7357ad87e7b30316554b760c75d5779.zip
llvm-1dee56aed7357ad87e7b30316554b760c75d5779.tar.gz
llvm-1dee56aed7357ad87e7b30316554b760c75d5779.tar.bz2
[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
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp4
1 files changed, 2 insertions, 2 deletions
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<char> &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);