aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-02 21:47:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-02 21:47:32 +0000
commit68ea2ac7fd98a5a44c7a5b04c54076cf794531cb (patch)
treead2d6b4b09a9d4b187a02885dc7d163c341de6f9 /lib/Frontend/ASTUnit.cpp
parent7facf8408ff426be732b9eb62c58d42e6177dd7b (diff)
ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor UseBumpAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 87d0d7d1a4..6cbcb46e52 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -199,8 +199,7 @@ public:
ASTUnit *ASTUnit::LoadFromCompilerInvocation(const CompilerInvocation &CI,
Diagnostic &Diags,
- bool OnlyLocalDecls,
- bool UseBumpAllocator) {
+ bool OnlyLocalDecls) {
// Create the compiler instance to use for building the AST.
CompilerInstance Clang;
llvm::OwningPtr<ASTUnit> AST;
@@ -233,6 +232,7 @@ ASTUnit *ASTUnit::LoadFromCompilerInvocation(const CompilerInvocation &CI,
// FIXME: Use the provided diagnostic client.
AST.reset(new ASTUnit());
+ AST->OnlyLocalDecls = OnlyLocalDecls;
AST->OriginalSourceFile = Clang.getFrontendOpts().Inputs[0].second;
// Create a file manager object to provide access to and cache the filesystem.
@@ -318,6 +318,6 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
(const char**) CCArgs.data()+CCArgs.size(),
Argv0, MainAddr, Diags);
- return LoadFromCompilerInvocation(CI, Diags, OnlyLocalDecls,
- UseBumpAllocator);
+ CI.getFrontendOpts().DisableFree = UseBumpAllocator;
+ return LoadFromCompilerInvocation(CI, Diags, OnlyLocalDecls);
}