Skip to content

Commit

Permalink
fix(IDF): functions with different calling conventions are different
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Dec 16, 2024
1 parent 52e7fe4 commit 25f2cf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/CheerpUtils/IdenticalCodeFolding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ bool IdenticalCodeFolding::equivalentFunction(const llvm::Function* A, const llv
if (!equivalentType(A->getReturnType(), B->getReturnType()))
return false;

if (A->getCallingConv() != B->getCallingConv()) {
return false;
}
if (A->empty() || B->empty())
return A->empty() == B->empty();

Expand Down

0 comments on commit 25f2cf9

Please sign in to comment.