summaryrefslogtreecommitdiffstats
path: root/clang/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
commita8b7f6bb13afee0f9b78e0040fcb6d1931ad9265 (patch)
tree3c56186b391ebb683921528bb1abcc5f4fbf25e4 /clang/lib/CodeGen/CGCall.cpp
parentc22f236e8144fb97fd7cc5b28fa1f190134aab88 (diff)
downloadbcm5719-llvm-a8b7f6bb13afee0f9b78e0040fcb6d1931ad9265.tar.gz
bcm5719-llvm-a8b7f6bb13afee0f9b78e0040fcb6d1931ad9265.zip
Initialize CGFunctionInfo isVariadic bit correctly.
llvm-svn: 63471
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index b6c5d8d273e..08d5da30fa3 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud