Mercurial > projects > ldc
comparison ir/irstruct.cpp @ 157:5c17f81fc1c1 trunk
[svn r173] moved IR state previously stored in Type into IrType and a Type->IrType map; fixes #7
author | ChristianK |
---|---|
date | Thu, 01 May 2008 13:32:08 +0200 |
parents | ce7b81fb957f |
children | db9890b3fb64 |
comparison
equal
deleted
inserted
replaced
156:ccd07d9f2ce9 | 157:5c17f81fc1c1 |
---|---|
1 #include "gen/llvm.h" | 1 #include "gen/llvm.h" |
2 #include "mtype.h" | 2 #include "mtype.h" |
3 #include "aggregate.h" | 3 #include "aggregate.h" |
4 #include "ir/irstruct.h" | 4 #include "ir/irstruct.h" |
5 #include "gen/irstate.h" | |
5 | 6 |
6 IrInterface::IrInterface(BaseClass* b, const llvm::StructType* vt) | 7 IrInterface::IrInterface(BaseClass* b, const llvm::StructType* vt) |
7 { | 8 { |
8 base = b; | 9 base = b; |
9 decl = b->base; | 10 decl = b->base; |
24 ////////////////////////////////////////////////////////////////////////////// | 25 ////////////////////////////////////////////////////////////////////////////// |
25 ////////////////////////////////////////////////////////////////////////////// | 26 ////////////////////////////////////////////////////////////////////////////// |
26 ////////////////////////////////////////////////////////////////////////////// | 27 ////////////////////////////////////////////////////////////////////////////// |
27 | 28 |
28 IrStruct::IrStruct(Type* t) | 29 IrStruct::IrStruct(Type* t) |
29 : recty((t->llvmType != NULL) ? *t->llvmType : llvm::OpaqueType::get()) | 30 : recty((gIR && gIR->irType[t].type) ? *gIR->irType[t].type : llvm::OpaqueType::get()) |
30 { | 31 { |
31 type = t; | 32 type = t; |
32 defined = false; | 33 defined = false; |
33 constinited = false; | 34 constinited = false; |
34 interfaceInfosTy = NULL; | 35 interfaceInfosTy = NULL; |