# HG changeset patch # User Tomas Lindquist Olsen # Date 1239913176 -7200 # Node ID 3ddec21fe2b6d7c1b04b8c58957749b38138a9fe # Parent 73b56541152cf642f0759a48f7fd566e96af948e Make typeinfo for struct diff -r 73b56541152c -r 3ddec21fe2b6 gen/structs.cpp --- a/gen/structs.cpp Thu Apr 16 21:15:42 2009 +0200 +++ b/gen/structs.cpp Thu Apr 16 22:19:36 2009 +0200 @@ -48,7 +48,8 @@ LLGlobalVariable* initZ = irstruct->getInitSymbol(); // perform definition - if (mustDefineSymbol(sd)) + bool needs_def = mustDefineSymbol(sd); + if (needs_def) { // set initZ initializer initZ->setInitializer(irstruct->getDefaultInit()); @@ -67,8 +68,11 @@ } } - // emit typeinfo - DtoTypeInfoOf(sd->type); + if (needs_def) + { + // emit typeinfo + DtoTypeInfoOf(sd->type); + } } //////////////////////////////////////////////////////////////////////////////////////////