Skip to content

Commit

Permalink
[clang] NFCI: Use DirectoryEntryRef in ASTWriter
Browse files Browse the repository at this point in the history
This removes the call to deprecated `DirectoryEntry::getName()`.
  • Loading branch information
jansvoboda11 committed May 31, 2023
1 parent 7de4352 commit 20edfae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clang/lib/Serialization/ASTWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1280,8 +1280,9 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
SmallString<128> BaseDir;
if (PP.getHeaderSearchInfo().getHeaderSearchOpts().ModuleFileHomeIsCwd) {
// Use the current working directory as the base path for all inputs.
auto *CWD =
Context.getSourceManager().getFileManager().getDirectory(".").get();
auto CWD =
Context.getSourceManager().getFileManager().getOptionalDirectoryRef(
".");
BaseDir.assign(CWD->getName());
} else {
BaseDir.assign(WritingModule->Directory->getName());
Expand Down

0 comments on commit 20edfae

Please sign in to comment.