aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-31 02:54:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-31 02:54:56 +0000
commit6f6b0367ba358e4bc921a6b7b7438d829bcb778a (patch)
tree82c88eab0f7dd733dc6a4effb9d5e3db5b28de45 /lib/CodeGen/CGCall.cpp
parent09796d6a23c683413470efd19dd5ad331d91af7d (diff)
Initialize CGFunctionInfo isVariadic bit correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index b6c5d8d273..08d5da30fa 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1284,8 +1284,10 @@ RValue CodeGenFunction::EmitCall(llvm::Value *Callee,
}
llvm::CallInst *CI = Builder.CreateCall(Callee,&Args[0],&Args[0]+Args.size());
- bool isVariadic = false; // cast<llvm::FunctionType>(Callee->getType())->isVarArg();
- CGFunctionInfo CallInfo(RetTy, CallArgs, isVariadic);
+ const llvm::Type *FnType =
+ cast<llvm::PointerType>(Callee->getType())->getElementType();
+ CGFunctionInfo CallInfo(RetTy, CallArgs,
+ cast<llvm::FunctionType>(FnType)->isVarArg());
// FIXME: Provide TargetDecl so nounwind, noreturn, etc, etc get set.
CodeGen::AttributeListType AttributeList;