aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2023-01-04 15:01:19 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2023-01-04 15:01:58 -0800
commit45f347270caffafe48146c6c7ed8301d91e492ad (patch)
tree264e4782227362d10ec8df8066429f3702e8c9ce /clang/lib/Frontend/InitPreprocessor.cpp
parentf95108f38a2dccf32cebd18e8e9ebf8c0b80ca80 (diff)
downloadllvm-45f347270caffafe48146c6c7ed8301d91e492ad.zip
llvm-45f347270caffafe48146c6c7ed8301d91e492ad.tar.gz
llvm-45f347270caffafe48146c6c7ed8301d91e492ad.tar.bz2
[dsymutil] Avoid invalid keep chains due to pruning
The pruning property that's part of the DIE info is fully computing during the analyzeContextInfo phase, but can be updated during the lookForDIEsToKeep phase. // Keep a module forward declaration if there is no definition. if (!(isODRAttribute(AttrSpec.Attr) && Info.Ctxt && Info.Ctxt->hasCanonicalDIE())) Info.Prune = false; When the pruning property is updated during the lookForDIEsToKeep phase, it's not propagated to the parent, unlike during the analyzeContextInfo phase. This can result in an invalid keep chain with the child DIE being marked as kept while its parent is still marked as pruned and therefore never kept, a situation that's now caught by 1b79bed8f532. This patch fixes this issue by updating the pruning properties of the parent DIE during the parent walk. Differential revision: https://reviews.llvm.org/D140930
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions