Mercurial > projects > ldc
diff gen/toobj.cpp @ 1163:ea52660f828b
Emit function bodies before generating the module info to make sure static
ctors are collected correctly. Fixes run/constructor_03.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 28 Mar 2009 20:45:33 +0100 |
parents | f528e55fb32f |
children | e40c65bd8c5d |
line wrap: on
line diff
--- a/gen/toobj.cpp Sat Mar 28 20:25:59 2009 +0100 +++ b/gen/toobj.cpp Sat Mar 28 20:45:33 2009 +0100 @@ -144,12 +144,12 @@ dsym->codegen(sir); } + // emit function bodies + sir->emitFunctionBodies(); + // generate ModuleInfo genmoduleinfo(); - // emit function bodies - sir->emitFunctionBodies(); - // emit usedArray if (!ir.usedArray.empty()) {