aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Frontend/ASTUnit.h3
-rw-r--r--lib/Frontend/ASTUnit.cpp8
2 files changed, 5 insertions, 6 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index 31d0b26c0d..08e8cf5aee 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -122,8 +122,7 @@ public:
// shouldn't need to specify them at construction time.
static ASTUnit *LoadFromCompilerInvocation(const CompilerInvocation &CI,
Diagnostic &Diags,
- bool OnlyLocalDecls = false,
- bool UseBumpAllocator = false);
+ bool OnlyLocalDecls = false);
/// LoadFromCommandLine - Create an ASTUnit from a vector of command line
/// arguments, which must specify exactly one source file.
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);
}