[cfe-commits] r63471 - /cfe/trunk/lib/CodeGen/CGCall.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jan 30 18:54:56 PST 2009
Author: ddunbar
Date: Fri Jan 30 20:54:56 2009
New Revision: 63471
URL: http://llvm.org/viewvc/llvm-project?rev=63471&view=rev
Log:
Initialize CGFunctionInfo isVariadic bit correctly.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63471&r1=63470&r2=63471&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Jan 30 20:54:56 2009
@@ -1284,8 +1284,10 @@
}
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;
More information about the cfe-commits
mailing list