Move FunctionType conversion into CGCall.cpp:
- Added CodeGenTypes::GetFunctionType, taking a CGFunctionInfo.
- Updated Obj-C runtimes to use this instead of rolling the
llvm::FunctionType by hand.
- Killed CodeGenTypes::{ConvertReturnType, DecodeArgumentTypes}.
Add ABIArgInfo class to encapsulate ABI decision of how to lower types
to LLVM.
- Will move to target sometime soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56047 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index c51c1d0..ffb9baa 100644
--- a/lib/CodeGen/CGCall.h
+++ b/lib/CodeGen/CGCall.h
@@ -54,18 +54,18 @@
/// CGFunctionInfo - Class to encapsulate the information about a
/// function definition.
class CGFunctionInfo {
- /// TheDecl - The decl we are storing information for. This is
- /// either a Function or ObjCMethod Decl.
- const Decl *TheDecl;
+ bool IsVariadic;
llvm::SmallVector<QualType, 16> ArgTypes;
public:
+ CGFunctionInfo(const FunctionTypeNoProto *FTNP);
+ CGFunctionInfo(const FunctionTypeProto *FTP);
CGFunctionInfo(const FunctionDecl *FD);
CGFunctionInfo(const ObjCMethodDecl *MD,
const ASTContext &Context);
- const Decl* getDecl() const { return TheDecl; }
+ bool isVariadic() const { return IsVariadic; }
ArgTypeIterator argtypes_begin() const;
ArgTypeIterator argtypes_end() const;