File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1456,7 +1456,17 @@ void DevirtModule::tryICallBranchFunnel(
14561456 if (!HasNonDevirt)
14571457 return ;
14581458
1459- // If any GV is AvailableExternally, drop to generate branch.funnel
1459+ // If any GV is AvailableExternally, not to generate branch.funnel.
1460+ // NOTE: It is to avoid crash in LowerTypeTest.
1461+ // If the branch.funnel is generated, because GV.isDeclarationForLinker(),
1462+ // in LowerTypeTestsModule::lower(), its GlobalTypeMember would NOT
1463+ // be saved in GlobalTypeMembers[&GV]. Then crash happens in
1464+ // buildBitSetsFromDisjointSet due to GlobalTypeMembers[&GV] is NULL.
1465+ // Even doing experiment to save it in GlobalTypeMembers[&GV] and
1466+ // making GlobalTypeMembers[&GV] be not NULL, crash could avoid from
1467+ // buildBitSetsFromDisjointSet. But still report_fatal_error in Verifier
1468+ // or SelectionDAGBuilder later, because operands linkage type consistency
1469+ // check of icall.branch.funnel can not pass.
14601470 for (auto &T : TargetsForSlot) {
14611471 if (T.TM ->Bits ->GV ->hasAvailableExternallyLinkage ())
14621472 return ;
You can’t perform that action at this time.
0 commit comments