diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-08 02:46:37 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-08 02:46:37 +0000 |
commit | 7e7e6253d45eb2ca4a4ad9cafcb8b80693f0670a (patch) | |
tree | 3f099d92aeca2397c818d5651b18e261704cc9af /lib/Sema/ParseAST.cpp | |
parent | 909cd267dd8f66867c0aaef3bef052dc27bde47c (diff) |
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
The motivation is that clients may either:
(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/ParseAST.cpp')
-rw-r--r-- | lib/Sema/ParseAST.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp index 6b9b8d5804..43736e32ac 100644 --- a/lib/Sema/ParseAST.cpp +++ b/lib/Sema/ParseAST.cpp @@ -27,7 +27,7 @@ using namespace clang; /// ParseAST - Parse the entire file specified, notifying the ASTConsumer as /// the file is parsed. This takes ownership of the ASTConsumer and /// ultimately deletes it. -void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats, bool DeleteConsumer) { +void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats) { // Collect global stats on Decls/Stmts (until we have a module streamer). if (PrintStats) { Decl::CollectingStats(true); @@ -77,7 +77,4 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, bool PrintStats, b Decl::CollectingStats(false); Stmt::CollectingStats(false); } - - if (DeleteConsumer) - delete Consumer; } |