Ensure that parameters passed to function call are of the right type.
This commit is contained in:
parent
6725cbaf88
commit
c9bff1e64b
|
@ -399,10 +399,12 @@ bool BitcodeEmitter::emit(FunctionCall const& node) {
|
|||
});
|
||||
}
|
||||
|
||||
auto param = callee->getArgumentList().begin();
|
||||
std::vector<llvm::Value*> callargs;
|
||||
for (Expression const* arg: node.getArgs()) {
|
||||
GUARDED(arg->emit(this));
|
||||
callargs.push_back(d->retval);
|
||||
callargs.push_back(coerce(d, d->retval, param->getType()));
|
||||
++param;
|
||||
}
|
||||
|
||||
d->retval = d->builder.CreateCall(callee, callargs);
|
||||
|
|
Reference in New Issue
Block a user