From b4fd6a61414b7c379178b6d79e7e422d2a148d34 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 26 Jun 2017 20:15:21 +0000 Subject: Remove some redundant setup when preprocessing .pcm files. Both of these steps are immediately overwritten by the FrontendAction setup. llvm-svn: 306325 --- clang/lib/Basic/SourceManager.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'clang/lib/Basic/SourceManager.cpp') diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index fc4c6d30380..3936afab21a 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -359,15 +359,6 @@ void SourceManager::initializeForReplay(const SourceManager &Old) { return Clone; }; - // Set up our main file ID as a copy of the old source manager's main file. - const SLocEntry &OldMainFile = Old.getSLocEntry(Old.getMainFileID()); - assert(OldMainFile.isFile() && "main file is macro expansion?"); - auto *MainCC = CloneContentCache(OldMainFile.getFile().getContentCache()); - MemBufferInfos.push_back(MainCC); - setMainFileID(createFileID(MainCC, SourceLocation(), - OldMainFile.getFile().getFileCharacteristic(), - 0, 0)); - // Ensure all SLocEntries are loaded from the external source. for (unsigned I = 0, N = Old.LoadedSLocEntryTable.size(); I != N; ++I) if (!Old.SLocEntryLoaded[I]) -- cgit v1.2.3