[clang] 45bf8e4 - [clang] NFCI: Use `FileEntryRef` in `ASTReader`

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 10 09:36:54 PDT 2023


Author: Jan Svoboda
Date: 2023-09-10T09:36:47-07:00
New Revision: 45bf8e432bc3f1433a18d6158eb9de62006dc09d

URL: https://github.com/llvm/llvm-project/commit/45bf8e432bc3f1433a18d6158eb9de62006dc09d
DIFF: https://github.com/llvm/llvm-project/commit/45bf8e432bc3f1433a18d6158eb9de62006dc09d.diff

LOG: [clang] NFCI: Use `FileEntryRef` in `ASTReader`

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 0cfecddc198db5a..2289edc511e9612 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5689,7 +5689,7 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
                                        "too many submodules");
 
       if (!ParentModule) {
-        if (const FileEntry *CurFile = CurrentModule->getASTFile()) {
+        if (OptionalFileEntryRef CurFile = CurrentModule->getASTFile()) {
           // Don't emit module relocation error if we have -fno-validate-pch
           if (!bool(PP.getPreprocessorOpts().DisablePCHOrModuleValidation &
                     DisableValidationForModuleKind::Module) &&


        


More information about the cfe-commits mailing list