Make sure to emit all the arguments to a function call. This fixes the
codegen of calls to functions without a prototype and varargs functions,
including printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46543 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGBuiltin.cpp b/CodeGen/CGBuiltin.cpp
index d8fe060..d298b40 100644
--- a/CodeGen/CGBuiltin.cpp
+++ b/CodeGen/CGBuiltin.cpp
@@ -30,7 +30,8 @@
default: {
if (getContext().BuiltinInfo.isLibFunction(BuiltinID))
return EmitCallExpr(CGM.getBuiltinLibFunction(BuiltinID),
- E->getCallee()->getType(), E->arg_begin());
+ E->getCallee()->getType(), E->arg_begin(),
+ E->getNumArgs());
// See if we have a target specific intrinsic.
Intrinsic::ID IntrinsicID;