summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Disassembler.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-23 16:25:39 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-23 16:25:39 +0000
commit467297ab48cdc353f1059d292e22043271602d2b (patch)
tree2ea496552c574bb5823378391ad6152f9c536e50 /llvm/lib/System/Disassembler.cpp
parent107d369b8b6a5c870c4e807c1334aaec59e0a734 (diff)
downloadbcm5719-llvm-467297ab48cdc353f1059d292e22043271602d2b.tar.gz
bcm5719-llvm-467297ab48cdc353f1059d292e22043271602d2b.zip
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
Diffstat (limited to 'llvm/lib/System/Disassembler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud