Mercurial > projects > ldc
comparison gen/toir.c @ 85:f869c636a113 trunk
[svn r89] Fixed a bunch of problems with template instance across multiple modules.
Fixed initialization of function local static variables, with a non const initializer (now happens on first call using a global to make sure it only happens once.)
author | lindquist |
---|---|
date | Fri, 02 Nov 2007 06:32:32 +0100 |
parents | 339422268de1 |
children |
comparison
equal
deleted
inserted
replaced
84:169711a7126e | 85:f869c636a113 |
---|---|
62 const llvm::Type* lltype = DtoType(vd->type); | 62 const llvm::Type* lltype = DtoType(vd->type); |
63 llvm::AllocaInst* allocainst = new llvm::AllocaInst(lltype, vd->toChars(), p->topallocapoint()); | 63 llvm::AllocaInst* allocainst = new llvm::AllocaInst(lltype, vd->toChars(), p->topallocapoint()); |
64 //allocainst->setAlignment(vd->type->alignsize()); // TODO | 64 //allocainst->setAlignment(vd->type->alignsize()); // TODO |
65 vd->llvmValue = allocainst; | 65 vd->llvmValue = allocainst; |
66 } | 66 } |
67 DtoInitializer(vd->init); | 67 elem* ie = DtoInitializer(vd->init); |
68 delete ie; | |
68 } | 69 } |
69 } | 70 } |
70 // struct declaration | 71 // struct declaration |
71 else if (StructDeclaration* s = declaration->isStructDeclaration()) | 72 else if (StructDeclaration* s = declaration->isStructDeclaration()) |
72 { | 73 { |