Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/gen/structs.cpp Fri Aug 01 19:54:31 2008 +0200 +++ b/gen/structs.cpp Fri Aug 01 21:54:40 2008 +0200 @@ -23,8 +23,11 @@ Logger::println("DtoConstStructInitializer: %s", si->toChars()); LOG_SCOPE; + assert(si->ad); TypeStruct* ts = (TypeStruct*)si->ad->type; + DtoResolveDsymbol(si->ad); + const llvm::StructType* structtype = isaStruct(ts->ir.type->get()); Logger::cout() << "llvm struct type: " << *structtype << '\n';