diff ir/irtype.h @ 1228:79758fd2f48a

Added Doxygen file. Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Wed, 15 Apr 2009 20:06:25 +0200
parents 3251ce06c820
children 46f6365a50d7
line wrap: on
line diff
--- a/ir/irtype.h	Mon Apr 13 17:42:36 2009 +0200
+++ b/ir/irtype.h	Wed Apr 15 20:06:25 2009 +0200
@@ -9,10 +9,13 @@
 
 struct Type;
 
+class IrTypeAggr;
 class IrTypeArray;
 class IrTypeBasic;
+class IrTypeClass;
 class IrTypePointer;
 class IrTypeSArray;
+class IrTypeStruct;
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -24,19 +27,29 @@
     IrType(Type* dt, const llvm::Type* lt);
 
     ///
-    Type* getD()                    { return dtype; }
-
-    ///
-    const llvm::Type* get()         { return pa.get(); }
-
+    virtual IrTypeAggr* isAggr()        { return NULL; }
     ///
     virtual IrTypeArray* isArray()      { return NULL; }
     ///
     virtual IrTypeBasic* isBasic()      { return NULL; }
     ///
+    virtual IrTypeClass* isClass()      { return NULL; }
+    ///
     virtual IrTypePointer* isPointer()  { return NULL; }
     ///
     virtual IrTypeSArray* isSArray()    { return NULL; }
+    ///
+    virtual IrTypeStruct* isStruct()    { return NULL; }
+
+    ///
+    Type* getD()                        { return dtype; }
+    ///
+    virtual const llvm::Type* get()     { return pa.get(); }
+    ///
+    llvm::PATypeHolder& getPA()         { return pa; }
+
+    ///
+    virtual const llvm::Type* buildType() = 0;
 
 protected:
     ///
@@ -58,6 +71,9 @@
     ///
     IrTypeBasic* isBasic()          { return this; }
 
+    ///
+    const llvm::Type* buildType();
+
 protected:
     ///
     const llvm::Type* basic2llvm(Type* t);
@@ -75,6 +91,9 @@
     ///
     IrTypePointer* isPointer()      { return this; }
 
+    ///
+    const llvm::Type* buildType();
+
 protected:
     ///
     const llvm::Type* pointer2llvm(Type* t);
@@ -92,6 +111,9 @@
     ///
     IrTypeSArray* isSArray()  { return this; }
 
+    ///
+    const llvm::Type* buildType();
+
 protected:
     ///
     const llvm::Type* sarray2llvm(Type* t);
@@ -112,6 +134,9 @@
     ///
     IrTypeArray* isArray()  { return this; }
 
+    ///
+    const llvm::Type* buildType();
+
 protected:
     ///
     const llvm::Type* array2llvm(Type* t);