Skip to content

Commit

Permalink
fixup! Prevent collapsing of secondary bases used inside a hierarchy …
Browse files Browse the repository at this point in the history
…where a downcast is done
  • Loading branch information
rvan-mee committed Jul 9, 2024
1 parent 8e10a60 commit 463c2a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/CheerpUtils/TypeOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ void TypeOptimizer::gatherAllTypesInfo(const Module& M)
{
for (uint32_t i = firstBase; i< (firstBase + baseCount); i++)
{
assert(sTy->getElementType(i)->isStructTy());
if (!sTy->getElementType(i)->isStructTy())
continue;
uncollapsibleSecondaryBases.insert(sTy->getElementType(i));
}
}
Expand Down

0 comments on commit 463c2a9

Please sign in to comment.