Skip to content

Commit

Permalink
[clang] NFCI: Use FileEntryRef in ASTWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
jansvoboda11 committed Sep 10, 2023
1 parent 45bf8e4 commit 7ad5b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,

// Original file name and file ID
SourceManager &SM = Context.getSourceManager();
if (const FileEntry *MainFile = SM.getFileEntryForID(SM.getMainFileID())) {
if (auto MainFile = SM.getFileEntryRefForID(SM.getMainFileID())) {
auto FileAbbrev = std::make_shared<BitCodeAbbrev>();
FileAbbrev->Add(BitCodeAbbrevOp(ORIGINAL_FILE));
FileAbbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // File ID
Expand Down

0 comments on commit 7ad5b18

Please sign in to comment.