Author: rsmith Date: Mon Jun 19 20:31:53 2017 New Revision: 305764 URL: http://llvm.org/viewvc/llvm-project?rev=305764&view=rev Log: Turn off "disable free" mode when preprocessing imported module files in -frewrite-imports mode.
This could end up accumulating a very large amount of intermediate state. Clear it out after each module file is processed. Modified: cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp Modified: cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp?rev=305764&r1=305763&r2=305764&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp (original) +++ cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp Mon Jun 19 20:31:53 2017 @@ -243,6 +243,7 @@ public: Instance.createDiagnostics( new ForwardingDiagnosticConsumer(CI.getDiagnosticClient()), /*ShouldOwnClient=*/true); + Instance.getFrontendOpts().DisableFree = false; Instance.getFrontendOpts().Inputs.clear(); Instance.getFrontendOpts().Inputs.emplace_back( Filename, InputKind(InputKind::Unknown, InputKind::Precompiled)); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits