[clang] 7ad5b18 - [clang] NFCI: Use `FileEntryRef` in `ASTWriter`
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 10 09:36:56 PDT 2023
Author: Jan Svoboda
Date: 2023-09-10T09:36:47-07:00
New Revision: 7ad5b1852287375758292d08de6f80c1a5e4904c
URL: https://github.com/llvm/llvm-project/commit/7ad5b1852287375758292d08de6f80c1a5e4904c
DIFF: https://github.com/llvm/llvm-project/commit/7ad5b1852287375758292d08de6f80c1a5e4904c.diff
LOG: [clang] NFCI: Use `FileEntryRef` in `ASTWriter`
Added:
Modified:
clang/lib/Serialization/ASTWriter.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index b4a68c1fdf947d8..5ba07271cd81867 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -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
More information about the cfe-commits
mailing list