aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-10 04:01:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-10 04:01:49 +0000
commit45c25ba11cbf8c9a461def5b03f6ee9481e06769 (patch)
tree2be394b3b5a29a887130e782ffc0fcac8a1f48cd /lib/CodeGen/CodeGenTypes.h
parent2c8e0f32b9c33686be23c70add0b97490903de9f (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
-rw-r--r--lib/CodeGen/CodeGenTypes.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h
index 150e0d615d..d89dfa6d0f 100644
--- a/lib/CodeGen/CodeGenTypes.h
+++ b/lib/CodeGen/CodeGenTypes.h
@@ -19,28 +19,30 @@
#include <vector>
namespace llvm {
+ class FunctionType;
class Module;
- class Type;
class OpaqueType;
class PATypeHolder;
class TargetData;
+ class Type;
}
namespace clang {
class ASTContext;
- class TagDecl;
- class TargetInfo;
- class QualType;
- class PointerType;
- class PointerLikeType;
- class Type;
- class FunctionTypeProto;
class FieldDecl;
- class RecordDecl;
+ class FunctionTypeProto;
class ObjCInterfaceDecl;
class ObjCIvarDecl;
+ class PointerLikeType;
+ class PointerType;
+ class QualType;
+ class RecordDecl;
+ class TagDecl;
+ class TargetInfo;
+ class Type;
namespace CodeGen {
+ class CGFunctionInfo;
class CodeGenTypes;
/// CGRecordLayout - This class handles struct and union layout info while
@@ -132,15 +134,15 @@ public:
/// ConvertType - Convert type T into a llvm::Type.
const llvm::Type *ConvertType(QualType T);
const llvm::Type *ConvertTypeRecursive(QualType T);
- /// ConvertReturnType - Convert T into an llvm::Type assuming that it will be
- /// used as a function return type.
- const llvm::Type *ConvertReturnType(QualType T);
/// ConvertTypeForMem - Convert type T into a llvm::Type. This differs from
/// ConvertType in that it is used to convert to the memory representation for
/// a type. For example, the scalar representation for _Bool is i1, but the
/// memory representation is usually i8 or i32, depending on the target.
const llvm::Type *ConvertTypeForMem(QualType T);
+
+ /// GetFunctionType - Get the LLVM function type from Info.
+ const llvm::FunctionType *GetFunctionType(const CGFunctionInfo &Info);
void CollectObjCIvarTypes(ObjCInterfaceDecl *ObjCClass,
std::vector<const llvm::Type*> &IvarTypes);
@@ -160,9 +162,6 @@ public:
void UpdateCompletedType(const TagDecl *TD);
public: // These are internal details of CGT that shouldn't be used externally.
- void DecodeArgumentTypes(const FunctionTypeProto &FTP,
- std::vector<const llvm::Type*> &ArgTys);
-
/// addFieldInfo - Assign field number to field FD.
void addFieldInfo(const FieldDecl *FD, unsigned No);