forked from OSchip/llvm-project
Add a getFunctionInfo that takes a BlockPointerType.
llvm-svn: 68452
This commit is contained in:
parent
2266e244b5
commit
6f811f149b
|
@ -53,6 +53,19 @@ CGFunctionInfo &CodeGenTypes::getFunctionInfo(const FunctionProtoType *FTP) {
|
|||
return getFunctionInfo(FTP->getResultType(), ArgTys);
|
||||
}
|
||||
|
||||
const
|
||||
CGFunctionInfo &CodeGenTypes::getFunctionInfo(const BlockPointerType *BPT) {
|
||||
llvm::SmallVector<QualType, 16> ArgTys;
|
||||
const FunctionProtoType *FTP =
|
||||
BPT->getPointeeType()->getAsFunctionProtoType();
|
||||
|
||||
// Add the block pointer.
|
||||
ArgTys.push_back(Context.getPointerType(Context.VoidTy));
|
||||
for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i)
|
||||
ArgTys.push_back(FTP->getArgType(i));
|
||||
return getFunctionInfo(FTP->getResultType(), ArgTys);
|
||||
}
|
||||
|
||||
const CGFunctionInfo &CodeGenTypes::getFunctionInfo(const CXXMethodDecl *MD) {
|
||||
llvm::SmallVector<QualType, 16> ArgTys;
|
||||
// Add the 'this' pointer.
|
||||
|
|
|
@ -172,11 +172,14 @@ public:
|
|||
|
||||
const CGFunctionInfo &getFunctionInfo(const FunctionNoProtoType *FTNP);
|
||||
const CGFunctionInfo &getFunctionInfo(const FunctionProtoType *FTP);
|
||||
const CGFunctionInfo &getFunctionInfo(const BlockPointerType *BPT);
|
||||
const CGFunctionInfo &getFunctionInfo(const FunctionDecl *FD);
|
||||
const CGFunctionInfo &getFunctionInfo(const CXXMethodDecl *MD);
|
||||
const CGFunctionInfo &getFunctionInfo(const ObjCMethodDecl *MD);
|
||||
//private:
|
||||
const CGFunctionInfo &getFunctionInfo(QualType ResTy,
|
||||
const CallArgList &Args);
|
||||
public:
|
||||
const CGFunctionInfo &getFunctionInfo(QualType ResTy,
|
||||
const FunctionArgList &Args);
|
||||
|
||||
|
|
Loading…
Reference in New Issue