diff options
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 2db8f830c46..1833ebbdc84 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -657,7 +657,7 @@ llvm::Error GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { Idx += Length; // Find the imported module file. - const FileEntry *DependsOnFile + auto DependsOnFile = FileMgr.getFile(ImportedFile, /*OpenFile=*/false, /*CacheFailure=*/false); @@ -669,11 +669,11 @@ llvm::Error GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { // Save the information in ImportedModuleFileInfo so we can verify after // loading all pcms. ImportedModuleFiles.insert(std::make_pair( - DependsOnFile, ImportedModuleFileInfo(StoredSize, StoredModTime, - StoredSignature))); + *DependsOnFile, ImportedModuleFileInfo(StoredSize, StoredModTime, + StoredSignature))); // Record the dependency. - unsigned DependsOnID = getModuleFileInfo(DependsOnFile).ID; + unsigned DependsOnID = getModuleFileInfo(*DependsOnFile).ID; getModuleFileInfo(File).Dependencies.push_back(DependsOnID); } @@ -894,12 +894,12 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, } // If we can't find the module file, skip it. - const FileEntry *ModuleFile = FileMgr.getFile(D->path()); + auto ModuleFile = FileMgr.getFile(D->path()); if (!ModuleFile) continue; // Load this module file. - if (llvm::Error Err = Builder.loadModuleFile(ModuleFile)) + if (llvm::Error Err = Builder.loadModuleFile(*ModuleFile)) return Err; } |