HomePhabricator

[Dominators] PR42041: Skip nullpointer successors

Description

[Dominators] PR42041: Skip nullpointer successors

https://bugs.llvm.org/show_bug.cgi?id=42041

In Clang's CFG, we use nullpointers to represent unreachable nodes, for
example, in the included testfile, block B0 is unreachable from block
B1, resulting in a nullpointer dereference somewhere in
llvm::DominatorTreeBase<clang::CFGBlock, false>::recalculate.

This patch fixes this issue by specializing
llvm::DomTreeBuilder::SemiNCAInfo::ChildrenGetter::Get for
clang::CFG to not contain nullpointer successors.

Differential Revision: https://reviews.llvm.org/D62507

Details

Committed
SzelethusJul 3 2019, 4:14 AM
Differential Revision
D62507: [Dominators] PR42041: Skip nullpointer successors
Branches
Unknown
Tags
Unknown