summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-07-06 21:24:28 +0000
committerEnrico Granata <egranata@apple.com>2016-07-06 21:24:28 +0000
commit106aae51083a9c389f050ca0491ba1c291059a23 (patch)
tree7ff417838e3a0d4361a3d7c589a15df2456da94d /llvm/tools/llvm-cov/SourceCoverageView.cpp
parent710c13167f2b1d37bf95487841bbc7a7034bdfd8 (diff)
downloadbcm5719-llvm-106aae51083a9c389f050ca0491ba1c291059a23.tar.gz
bcm5719-llvm-106aae51083a9c389f050ca0491ba1c291059a23.zip
Because of our lifetime rules w.r.t. ValueObjects and ClusterManagers, synthetic children caching is a tricky area:
- if a synthetic child comes from the same hierarchy as its parent object, then it can't be cached by SharedPointer inside the synthetic provider, or it will cause a reference loop; - but, if a synthetic child is made from whole cloth (e.g. from an expression, a memory region, ...), then it better be cached by SharedPointer, or it will be cleared out and cause an assert() to fail if used at a later point For most cases of self-rooted synthetic children, we have a flag we set "IsSyntheticChildrenGenerated", but we were not using it to track caching. So, what ended up happening is each provider would set up its own cache, and if it got it wrong, a hard to diagnose crash would ensue This patch fixes that by centralizing caching in ValueObjectSynthetic - if a provider returns a self-rooted child (as per the flag), then it gets cached centrally by the ValueObject itself This cache is used only for lifetime management and not later retrieval of child values - a different cache handles that (because we might have a mix of self-rooted and properly nested child values for the same parent, we can't trivially use this lifetime cache for retrieval) Fixes rdar://26480007 llvm-svn: 274683
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud