diff gen/irstate.cpp @ 136:0e28624814e8 trunk

[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
author lindquist
date Thu, 17 Jan 2008 03:15:12 +0100
parents 27b9f749d9fe
children 8f704cb9969b
line wrap: on
line diff
--- a/gen/irstate.cpp	Mon Jan 14 23:09:55 2008 +0100
+++ b/gen/irstate.cpp	Thu Jan 17 03:15:12 2008 +0100
@@ -40,7 +40,7 @@
     ir.state = this;
 }
 
-IRFunction* IRState::func()
+IrFunction* IRState::func()
 {
     assert(!functions.empty() && "Function stack is empty!");
     return functions.back();
@@ -64,7 +64,7 @@
     return functions.back()->allocapoint;
 }
 
-IRStruct* IRState::topstruct()
+IrStruct* IRState::topstruct()
 {
     assert(!structs.empty() && "Struct vector is empty!");
     return structs.back();
@@ -101,32 +101,6 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-IRStruct::IRStruct(Type* t)
- : recty((t->llvmType != NULL) ? *t->llvmType : llvm::OpaqueType::get())
-{
-    type = t;
-    defined = false;
-    constinited = false;
-    interfaceInfosTy = NULL;
-    interfaceInfos = NULL;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-
-IRFinally::IRFinally()
-{
-    bb = 0;
-    retbb = 0;
-}
-
-IRFinally::IRFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb)
-{
-    bb = b;
-    retbb = rb;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-
 LLVMBuilder* IRBuilderHelper::operator->()
 {
     LLVMBuilder& b = state->scope().builder;
@@ -136,20 +110,6 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-IRFunction::IRFunction(FuncDeclaration* fd)
-{
-    decl = fd;
-    Type* t = DtoDType(fd->type);
-    assert(t->ty == Tfunction);
-    type = (TypeFunction*)t;
-    func = NULL;
-    allocapoint = NULL;
-    finallyretval = NULL;
-    defined = false;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////
-
 IRExp::IRExp()
 {
     e1 = e2 = NULL;
@@ -162,11 +122,3 @@
     e2 = r;
     v = val;
 }
-
-//////////////////////////////////////////////////////////////////////////////////////////
-
-IRGlobal::IRGlobal(VarDeclaration* v) :
-    type(llvm::OpaqueType::get())
-{
-    var = v;
-}