Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll

llvm-svn: 6273
This commit is contained in:
Chris Lattner 2003-05-21 20:51:52 +00:00
parent 6f364249d8
commit fa58d79cf2
1 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,11 @@ static void ConvertCallTo(CallInst *CI, Function *Dest) {
Params.push_back(V);
}
// If the function takes extra parameters that are not being passed in, pass
// null values in now...
for (unsigned i = NumArgsToCopy; i < ParamTys.size(); ++i)
Params.push_back(Constant::getNullValue(ParamTys[i]));
// Replace the old call instruction with a new call instruction that calls
// the real function.
//