Move backend output out of destructor.
Don't free AST consumer when --disable-free is set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59030 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 5fc86a7..4973a42 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1363,6 +1363,9 @@
// files.
if (ClearSourceMgr)
PP.getSourceManager().clearIDTables();
+
+ if (DisableFree)
+ Consumer.take();
}
static void ProcessSerializedFile(const std::string& InFile, Diagnostic& Diag,