//===----- CGCall.h - Encapsulate calling convention details ----*- C++ -*-===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// These classes wrap the information about a call or function// definition used to handle ABI compliancy.////===----------------------------------------------------------------------===//#include"CGCall.h"#include"CodeGenFunction.h"#include"CodeGenModule.h"#include"clang/Basic/TargetInfo.h"#include"clang/AST/ASTContext.h"#include"clang/AST/Decl.h"#include"clang/AST/DeclObjC.h"#include"clang/AST/RecordLayout.h"#include"llvm/ADT/StringExtras.h"#include"llvm/Attributes.h"#include"llvm/Support/CommandLine.h"#include"llvm/Target/TargetData.h"usingnamespaceclang;usingnamespaceCodeGen;/***/// FIXME: Use iterator and sidestep silly type array creation.CGFunctionInfo::CGFunctionInfo(constFunctionTypeNoProto*FTNP):IsVariadic(true){ArgTypes.push_back(FTNP->getResultType());}CGFunctionInfo::CGFunctionInfo(constFunctionTypeProto*FTP):IsVariadic(FTP->isVariadic()){ArgTypes.push_back(FTP->getResultType());for(unsignedi=0,e=FTP->getNumArgs();i!=e;++i)ArgTypes.push_back(FTP->getArgType(i));}// FIXME: Is there really any reason to have this still?CGFunctionInfo::CGFunctionInfo(constFunctionDecl*FD){constFunctionType*FTy=FD->getType()->getAsFunctionType();constFunctionTypeProto*FTP=dyn_cast<FunctionTypeProto>(FTy);ArgTypes.push_back(FTy->getResultType());if(FTP){IsVariadic=FTP->isVariadic();for(unsignedi=0,e=FTP->getNumArgs();i!=e;++i)ArgTypes.push_back(FTP->getArgType(i));}else{IsVariadic=true;}}CGFunctionInfo::CGFunctionInfo(constObjCMethodDecl*MD,constASTContext&Context):IsVariadic(MD->isVariadic()){ArgTypes.push_back(MD->getResultType());ArgTypes.push_back(