]> granicus.if.org Git - clang/commitdiff
Turn off "disable free" mode when preprocessing imported module files in
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 20 Jun 2017 01:31:53 +0000 (01:31 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 20 Jun 2017 01:31:53 +0000 (01:31 +0000)
-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

lib/Frontend/Rewrite/FrontendActions.cpp

index 2ccdc263951b4e19da61fb3527209524ed1d03e5..f64fbdafd597f77601ea3022e8c450ff49072c94 100644 (file)
@@ -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));