summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/FunctionResolution.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-21 20:51:52 +0000
committerChris Lattner <sabre@nondot.org>2003-05-21 20:51:52 +0000
commitc52b30dcfbc66a77d04fd152d3261f401aa05a0b (patch)
treebbc27943fb90a964c915e19fb52605a5d0d03e9c /lib/Transforms/IPO/FunctionResolution.cpp
parent62a4b839a6a3689e4406da0c4351faae6696bf89 (diff)
downloadllvm-c52b30dcfbc66a77d04fd152d3261f401aa05a0b.tar.gz
llvm-c52b30dcfbc66a77d04fd152d3261f401aa05a0b.tar.bz2
llvm-c52b30dcfbc66a77d04fd152d3261f401aa05a0b.tar.xz
Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionResolution.cpp')
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp
index 1b1065e3e9..861e810601 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -76,6 +76,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.