Mercurial > projects > ldc
comparison gen/structs.cpp @ 449:56265fa07c7d
Fixed problem where global variables did not resolve type before using it.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 21:54:40 +0200 |
parents | 44f08170f4ef |
children | a34078905d01 |
comparison
equal
deleted
inserted
replaced
447:f7259fa1349c | 449:56265fa07c7d |
---|---|
21 LLConstant* DtoConstStructInitializer(StructInitializer* si) | 21 LLConstant* DtoConstStructInitializer(StructInitializer* si) |
22 { | 22 { |
23 Logger::println("DtoConstStructInitializer: %s", si->toChars()); | 23 Logger::println("DtoConstStructInitializer: %s", si->toChars()); |
24 LOG_SCOPE; | 24 LOG_SCOPE; |
25 | 25 |
26 assert(si->ad); | |
26 TypeStruct* ts = (TypeStruct*)si->ad->type; | 27 TypeStruct* ts = (TypeStruct*)si->ad->type; |
28 | |
29 DtoResolveDsymbol(si->ad); | |
27 | 30 |
28 const llvm::StructType* structtype = isaStruct(ts->ir.type->get()); | 31 const llvm::StructType* structtype = isaStruct(ts->ir.type->get()); |
29 Logger::cout() << "llvm struct type: " << *structtype << '\n'; | 32 Logger::cout() << "llvm struct type: " << *structtype << '\n'; |
30 | 33 |
31 assert(si->value.dim == si->vars.dim); | 34 assert(si->value.dim == si->vars.dim); |