hanchenye-llvm-project/clang/lib/AST
Ted Kremenek 467297ab48 TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
when it is constructed via deserialization.  This is done by recording a flag
indicating that this is the case, and it deletes these objects by getting
the references stored in the ASTContext object.  This fixes some memory
leaks that occurs when we deserialize translation units from bitcode files.

The rationale between having TranslationUnit sometimes own these objects and
sometimes not is that a TranslationUnit object can be constructed from
state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus
in these cases won't own the IdentifierTable or Selectors, etc.  During
deserialization, there is no Preprocessor, so somebody needs to own these
objects in order for them to be properly reclaimed.

llvm-svn: 50149
2008-04-23 16:25:39 +00:00
..
ASTConsumer.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
ASTContext.cpp OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. 2008-04-18 23:10:10 +00:00
Builtins.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
CFG.cpp Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a block's terminator. 2008-04-16 21:10:48 +00:00
Decl.cpp "This patch renames 2008-04-22 18:39:57 +00:00
DeclObjC.cpp Patch to build AST for property implementation declarations and 2008-04-23 00:06:01 +00:00
DeclSerialization.cpp "This patch renames 2008-04-22 18:39:57 +00:00
Expr.cpp OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. 2008-04-18 23:10:10 +00:00
ExprCXX.cpp Several improvements from Doug Gregor related to default 2008-04-10 02:22:51 +00:00
Makefile Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
Stmt.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
StmtDumper.cpp OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. 2008-04-18 23:10:10 +00:00
StmtIterator.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
StmtPrinter.cpp OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. 2008-04-18 23:10:10 +00:00
StmtSerialization.cpp Add support for C++ default arguments, and rework Parse-Sema 2008-04-08 04:40:51 +00:00
StmtViz.cpp Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00
TranslationUnit.cpp TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects 2008-04-23 16:25:39 +00:00
Type.cpp OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris. 2008-04-18 23:10:10 +00:00
TypeSerialization.cpp Pass the ASTContext object around when deserializing Decl and Stmt objects, so 2008-04-07 21:55:54 +00:00