Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 1b79bed. 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
- Loading branch information