summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenTypes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-30 23:03:07 +0000
committerChris Lattner <sabre@nondot.org>2008-03-30 23:03:07 +0000
commit391d77a26382dddf25da73e29fc1fa5aaaea4c6f (patch)
treeb842c678fe95a0feed12419eb419e091d22fff49 /lib/CodeGen/CodeGenTypes.h
parenta7b402dc258bf38ab5e206dbf4916a69d3ee3cc8 (diff)
downloadclang-391d77a26382dddf25da73e29fc1fa5aaaea4c6f.tar.gz
clang-391d77a26382dddf25da73e29fc1fa5aaaea4c6f.tar.bz2
clang-391d77a26382dddf25da73e29fc1fa5aaaea4c6f.tar.xz
Add initial support for objc codegen for methods, ivars, and the
etoile runtime, patch by David Chisnall! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
-rw-r--r--lib/CodeGen/CodeGenTypes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h
index 08a2467106..f1a680c46f 100644
--- a/lib/CodeGen/CodeGenTypes.h
+++ b/lib/CodeGen/CodeGenTypes.h
@@ -34,6 +34,8 @@ namespace clang {
class FunctionTypeProto;
class FieldDecl;
class RecordDecl;
+ class ObjCInterfaceDecl;
+ class ObjCIvarDecl;
namespace CodeGen {
class CodeGenTypes;
@@ -86,6 +88,7 @@ class CodeGenTypes {
/// FieldInfo - This maps struct field with corresponding llvm struct type
/// field no. This info is populated by record organizer.
llvm::DenseMap<const FieldDecl *, unsigned> FieldInfo;
+ llvm::DenseMap<const ObjCIvarDecl *, unsigned> ObjCIvarInfo;
public:
class BitFieldInfo {
@@ -128,12 +131,15 @@ public:
/// memory representation is usually i8 or i32, depending on the target.
const llvm::Type *ConvertTypeForMem(QualType T);
+ void CollectObjCIvarTypes(ObjCInterfaceDecl *ObjCClass,
+ std::vector<const llvm::Type*> &IvarTypes);
const CGRecordLayout *getCGRecordLayout(const TagDecl*) const;
/// getLLVMFieldNo - Return llvm::StructType element number
/// that corresponds to the field FD.
unsigned getLLVMFieldNo(const FieldDecl *FD);
+ unsigned getLLVMFieldNo(const ObjCIvarDecl *OID);
/// UpdateCompletedType - When we find the full definition for a TagDecl,