[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though

This commit is contained in:
Tomas Lindquist Olsen
2008-01-17 03:15:12 +01:00
parent 4f977e3cec
commit 5652546986
40 changed files with 900 additions and 548 deletions

View File

@@ -40,7 +40,7 @@ IRState::IRState()
ir.state = this;
}
IRFunction* IRState::func()
IrFunction* IRState::func()
{
assert(!functions.empty() && "Function stack is empty!");
return functions.back();
@@ -64,7 +64,7 @@ llvm::Instruction* IRState::topallocapoint()
return functions.back()->allocapoint;
}
IRStruct* IRState::topstruct()
IrStruct* IRState::topstruct()
{
assert(!structs.empty() && "Struct vector is empty!");
return structs.back();
@@ -101,32 +101,6 @@ bool IRState::scopereturned()
//////////////////////////////////////////////////////////////////////////////////////////
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 @@ LLVMBuilder* IRBuilderHelper::operator->()
//////////////////////////////////////////////////////////////////////////////////////////
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 @@ IRExp::IRExp(Expression* l, Expression* r, DValue* val)
e2 = r;
v = val;
}
//////////////////////////////////////////////////////////////////////////////////////////
IRGlobal::IRGlobal(VarDeclaration* v) :
type(llvm::OpaqueType::get())
{
var = v;
}