From: Richard Smith Date: Tue, 20 Jun 2017 01:31:53 +0000 (+0000) Subject: Turn off "disable free" mode when preprocessing imported module files in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cdc846bf68eaeabea7f515b0daa3657777924c0f;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305764 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/Rewrite/FrontendActions.cpp b/lib/Frontend/Rewrite/FrontendActions.cpp index 2ccdc26395..f64fbdafd5 100644 --- a/lib/Frontend/Rewrite/FrontendActions.cpp +++ b/lib/Frontend/Rewrite/FrontendActions.cpp @@ -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));