[clang] b19fe81 - [clang][deps] NFCI: Use `FileEntryRef` in `ModuleDepCollectorPP`

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


Author: Jan Svoboda
Date: 2023-09-10T19:53:54-07:00
New Revision: b19fe81eb5012cf19eec22ec6f6db677ce1aee54

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

LOG: [clang][deps] NFCI: Use `FileEntryRef` in `ModuleDepCollectorPP`

Added: 
    

Modified: 
    clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
index 7e03a415377921f..5e028c4431fe90f 100644
--- a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
+++ b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
@@ -408,7 +408,7 @@ void ModuleDepCollectorPP::handleImport(const Module *Imported) {
 void ModuleDepCollectorPP::EndOfMainFile() {
   FileID MainFileID = MDC.ScanInstance.getSourceManager().getMainFileID();
   MDC.MainFile = std::string(MDC.ScanInstance.getSourceManager()
-                                 .getFileEntryForID(MainFileID)
+                                 .getFileEntryRefForID(MainFileID)
                                  ->getName());
 
   auto &PP = MDC.ScanInstance.getPreprocessor();


        


More information about the cfe-commits mailing list