Skip to content

Commit

Permalink
fix(CallConstructors): strip AS casts when retrieving the constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Oct 18, 2024
1 parent cd3a181 commit 1d938f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/CheerpUtils/CallConstructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ PreservedAnalyses CallConstructorsPass::run(llvm::Module &M, llvm::ModuleAnalysi

for (Constant* C: cheerp::getGlobalConstructors(M))
{
Builder.CreateCall(Ty, cast<Function>(C->getAggregateElement(1)));
Builder.CreateCall(Ty, cast<Function>(C->getAggregateElement(1)->stripPointerCastsSafe()));
}
Function* Main = getMainFunction(M);
bool Wasi = Triple(M.getTargetTriple()).getOS() == Triple::WASI;
Expand Down

0 comments on commit 1d938f0

Please sign in to comment.