aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-18 23:38:21 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-18 23:38:21 +0000
commitf421089b73800066bbf43613c9a8422a96c1b0c3 (patch)
treeb452cd99ab3d0deebf9c8ef3bd25479cc91c98b7 /lib/Frontend/ASTUnit.cpp
parentcf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 (diff)
When creating an ASTUnit by parsing source code, set DisableFree to
false (not true), so that the CompilerInstance will actually free data structures when it's done. This fixes a major leak with libclang's in-process code completion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111457 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 28cdc52922..f689404460 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -1377,7 +1377,7 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
// Override the resources path.
CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath;
- CI->getFrontendOpts().DisableFree = true;
+ CI->getFrontendOpts().DisableFree = false;
return LoadFromCompilerInvocation(CI.take(), Diags, OnlyLocalDecls,
CaptureDiagnostics, PrecompilePreamble,
CompleteTranslationUnit,