diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-06-15 11:09:02 +0200 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-06-15 11:22:31 +0200 |
commit | 1dee56aed7357ad87e7b30316554b760c75d5779 (patch) | |
tree | c714be55632a5eceb4001f3d9ecbbcf24df9cfee /clang/lib/Lex/ModuleMap.cpp | |
parent | 7bca6f452f53a4a8d31a56b480e5b9fbaabad4fb (diff) | |
download | llvm-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.cpp | 4 |
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); |