You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
errs() << " unexpected number of arguments " << utostr(ActualNumArgs) << " in call to '" << F->getName() << "', should be " << utostr(TypeNumArgs) << "\n";
55
55
}
56
-
// TODO: also check types of arguments, but must take into account JS types, not LLVM types
56
+
for (unsigned i = 0; i < std::min(TypeNumArgs, ActualNumArgs); i++) {
57
+
Type *TypeType = FT->getParamType(i);
58
+
Type *ActualType = CI->getOperand(i)->getType();
59
+
if (getFunctionSignatureLetter(TypeType) != getFunctionSignatureLetter(ActualType)) {
60
+
errs().changeColor(raw_ostream::YELLOW);
61
+
errs() << "warning:";
62
+
errs().resetColor();
63
+
errs() << " unexpected argument type " << *ActualType << " at index " << utostr(i) << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
64
+
}
65
+
}
66
+
Type *TypeType = FT->getReturnType();
67
+
Type *ActualType = CI->getType();
68
+
if (getFunctionSignatureLetter(TypeType) != getFunctionSignatureLetter(ActualType)) {
69
+
errs().changeColor(raw_ostream::YELLOW);
70
+
errs() << "warning:";
71
+
errs().resetColor();
72
+
errs() << " unexpected return type " << *ActualType << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
73
+
}
57
74
}
58
75
} else {
59
76
if (isAbsolute(CV)) return"abort(); /* segfault, call an absolute addr */";
0 commit comments