Author: rsmith Date: Mon Jun 26 13:15:21 2017 New Revision: 306325 URL: http://llvm.org/viewvc/llvm-project?rev=306325&view=rev Log: Remove some redundant setup when preprocessing .pcm files.
Both of these steps are immediately overwritten by the FrontendAction setup. Modified: cfe/trunk/lib/Basic/SourceManager.cpp cfe/trunk/lib/Frontend/FrontendAction.cpp Modified: cfe/trunk/lib/Basic/SourceManager.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=306325&r1=306324&r2=306325&view=diff ============================================================================== --- cfe/trunk/lib/Basic/SourceManager.cpp (original) +++ cfe/trunk/lib/Basic/SourceManager.cpp Mon Jun 26 13:15:21 2017 @@ -359,15 +359,6 @@ void SourceManager::initializeForReplay( 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]) Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=306325&r1=306324&r2=306325&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/FrontendAction.cpp (original) +++ cfe/trunk/lib/Frontend/FrontendAction.cpp Mon Jun 26 13:15:21 2017 @@ -561,7 +561,6 @@ bool FrontendAction::BeginSourceFile(Com CI.setFileManager(&AST->getFileManager()); CI.createSourceManager(CI.getFileManager()); CI.getSourceManager().initializeForReplay(AST->getSourceManager()); - CI.createPreprocessor(getTranslationUnitKind()); // Set up the input file for replay purposes. auto Kind = AST->getInputKind(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits