forked from OSchip/llvm-project
[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
This commit is contained in:
parent
1d3ba05e4a
commit
ba118f3067
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue