summaryrefslogtreecommitdiff
path: root/src/ir/function-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/function-utils.h')
-rw-r--r--src/ir/function-utils.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ir/function-utils.h b/src/ir/function-utils.h
index 61af153a0..f172240e2 100644
--- a/src/ir/function-utils.h
+++ b/src/ir/function-utils.h
@@ -28,23 +28,17 @@ namespace FunctionUtils {
// everything but their name (which can't be the same, in the same
// module!) - same params, vars, body, result, etc.
inline bool equal(Function* left, Function* right) {
- if (left->getNumParams() != right->getNumParams()) {
+ if (left->sig != right->sig) {
return false;
}
if (left->getNumVars() != right->getNumVars()) {
return false;
}
- for (Index i = 0; i < left->getNumLocals(); i++) {
+ for (Index i = left->sig.params.size(); i < left->getNumLocals(); i++) {
if (left->getLocalType(i) != right->getLocalType(i)) {
return false;
}
}
- if (left->result != right->result) {
- return false;
- }
- if (left->type != right->type) {
- return false;
- }
if (!left->imported() && !right->imported()) {
return ExpressionAnalyzer::equal(left->body, right->body);
}