diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2022-04-20 18:54:36 +0200 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2022-04-20 18:54:39 +0200 |
commit | ba118f30676d44025885f422e29fe853a84495f8 (patch) | |
tree | 63b3c8f12cfcb83b251c6c49dacec94b562ecd1d /clang/lib/Frontend/FrontendAction.cpp | |
parent | 1d3ba05e4a288b49287fe997763e90234b8c62db (diff) | |
download | llvm-ba118f30676d44025885f422e29fe853a84495f8.zip llvm-ba118f30676d44025885f422e29fe853a84495f8.tar.gz llvm-ba118f30676d44025885f422e29fe853a84495f8.tar.bz2 |
[clang] NFCI: Use DirectoryEntryRef in FrontendAction::BeginSourceFile()
This patch removes use of the deprecated `DirectoryEntry::getName()` from `FrontendAction::BeginSourceFile()`.
Reviewed By: bnbarham
Differential Revision: https://reviews.llvm.org/D123853
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 45245f3..68c70dd 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -761,10 +761,10 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, PreprocessorOptions &PPOpts = CI.getPreprocessorOpts(); StringRef PCHInclude = PPOpts.ImplicitPCHInclude; std::string SpecificModuleCachePath = CI.getSpecificModuleCachePath(); - if (auto PCHDir = FileMgr.getDirectory(PCHInclude)) { + if (auto PCHDir = FileMgr.getOptionalDirectoryRef(PCHInclude)) { std::error_code EC; SmallString<128> DirNative; - llvm::sys::path::native((*PCHDir)->getName(), DirNative); + llvm::sys::path::native(PCHDir->getName(), DirNative); bool Found = false; llvm::vfs::FileSystem &FS = FileMgr.getVirtualFileSystem(); for (llvm::vfs::directory_iterator Dir = FS.dir_begin(DirNative, EC), |