//===----------------------------------------------------------------------===//
#include "CGCall.h"
+#include "ABIInfo.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/Attributes.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Target/TargetData.h"
-
-#include "ABIInfo.h"
-
using namespace clang;
using namespace CodeGen;
/***/
-// FIXME: Use iterator and sidestep silly type array creation.
-
static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) {
switch (CC) {
default: return llvm::CallingConv::C;
for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i)
ArgTys.push_back(FTP->getArgType(i));
CanQualType ResTy = FTP->getResultType().getUnqualifiedType();
- return CGT.getFunctionInfo(ResTy, ArgTys,
- FTP->getExtInfo());
+ return CGT.getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo());
}
const CGFunctionInfo &
Args.data(), Args.data()+Args.size());
EmitBlock(Cont);
}
- if (callOrInvoke) {
+ if (callOrInvoke)
*callOrInvoke = CS.getInstruction();
- }
CS.setAttributes(Attrs);
CS.setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv));
case Type::FunctionNoProto:
case Type::FunctionProto: {
// First, check whether we can build the full function type.
- if (const TagType* TT = VerifyFuncTypeComplete(&Ty)) {
+ if (const TagType *TT = VerifyFuncTypeComplete(&Ty)) {
// This function's type depends on an incomplete tag type; make sure
// we have an opaque type corresponding to the tag type.
ConvertTagDeclType(TT->getDecl());