[cfe-commits] r90348 - in /cfe/trunk: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp
Daniel Dunbar
daniel at zuster.org
Wed Dec 2 13:47:33 PST 2009
Author: ddunbar
Date: Wed Dec 2 15:47:32 2009
New Revision: 90348
URL: http://llvm.org/viewvc/llvm-project?rev=90348&view=rev
Log:
ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor UseBumpAllocator.
Modified:
cfe/trunk/include/clang/Frontend/ASTUnit.h
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=90348&r1=90347&r2=90348&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Wed Dec 2 15:47:32 2009
@@ -122,8 +122,7 @@
// 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.
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=90348&r1=90347&r2=90348&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Wed Dec 2 15:47:32 2009
@@ -199,8 +199,7 @@
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 @@
// 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 @@
(const char**) CCArgs.data()+CCArgs.size(),
Argv0, MainAddr, Diags);
- return LoadFromCompilerInvocation(CI, Diags, OnlyLocalDecls,
- UseBumpAllocator);
+ CI.getFrontendOpts().DisableFree = UseBumpAllocator;
+ return LoadFromCompilerInvocation(CI, Diags, OnlyLocalDecls);
}
More information about the cfe-commits
mailing list