Skip to content

Commit ba118f3

Browse files
committed
[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
1 parent 1d3ba05 commit ba118f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Frontend/FrontendAction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,10 +761,10 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
761761
PreprocessorOptions &PPOpts = CI.getPreprocessorOpts();
762762
StringRef PCHInclude = PPOpts.ImplicitPCHInclude;
763763
std::string SpecificModuleCachePath = CI.getSpecificModuleCachePath();
764-
if (auto PCHDir = FileMgr.getDirectory(PCHInclude)) {
764+
if (auto PCHDir = FileMgr.getOptionalDirectoryRef(PCHInclude)) {
765765
std::error_code EC;
766766
SmallString<128> DirNative;
767-
llvm::sys::path::native((*PCHDir)->getName(), DirNative);
767+
llvm::sys::path::native(PCHDir->getName(), DirNative);
768768
bool Found = false;
769769
llvm::vfs::FileSystem &FS = FileMgr.getVirtualFileSystem();
770770
for (llvm::vfs::directory_iterator Dir = FS.dir_begin(DirNative, EC),

0 commit comments

Comments
 (0)