summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_codegen.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-05-08 04:26:47 +0000
committerNico Weber <nicolasweber@gmx.de>2014-05-08 04:26:47 +0000
commit824285ec537f78d2e7143c148edc651b7eb78d99 (patch)
treef599cb28fb5b566b67ee596628ec5aa761705ca6 /clang/test/OpenMP/parallel_codegen.cpp
parent789d3007fb0d84084ffd9c48beb024f8afac7f25 (diff)
downloadbcm5719-llvm-824285ec537f78d2e7143c148edc651b7eb78d99.tar.gz
bcm5719-llvm-824285ec537f78d2e7143c148edc651b7eb78d99.zip
Let ASTReader optionally delete its ASTDeserializationListener.
Use this to fix the leak of DeserializedDeclsDumper and DeserializedDeclsChecker in FrontendAction (found by LSan), PR19560. The "delete this" bool is necessary because both PCHGenerator and ASTUnit return the same object from both getDeserializationListener() and getASTMutationListener(), so ASTReader can't just have a unique_ptr. It's also not possible to just let FrontendAction (or CompilerInstance) own these listeners due to lifetime issues (see comments on PR19560). Finally, ASTDeserializationListener can't easily be refcounted, since several of the current listeners are allocated on the stack. Having this bool isn't ideal, but it's a pattern that's used in other places in the codebase too, and it seems better than leaking. llvm-svn: 208277
Diffstat (limited to 'clang/test/OpenMP/parallel_codegen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud