Skip to content

Commit

Permalink
fix(PreExecute): strip casts on constructor array elements
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Oct 17, 2024
1 parent 6dfb6ea commit 9632ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CheerpWriter/PreExecute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ bool PreExecute::runOnModule(Module& m)
for (auto it = constructors.begin(); it != constructors.end();++it)
{
Constant* elem = *it;
Function* func = cast<Function>(elem->getAggregateElement(1));
Function* func = cast<Function>(elem->getAggregateElement(1)->stripPointerCastsSafe());
int prio = cast<ConstantInt>(elem->getAggregateElement(0u))->getSExtValue();
if (prio != curPrio && abortAtNextPrio)
{
Expand Down

0 comments on commit 9632ebe

Please sign in to comment.