mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 21:03:14 +01:00
Emit function bodies before generating the module info to make sure static
ctors are collected correctly. Fixes run/constructor_03.
This commit is contained in:
@@ -144,12 +144,12 @@ llvm::Module* Module::genLLVMModule(Ir* sir)
|
||||
dsym->codegen(sir);
|
||||
}
|
||||
|
||||
// generate ModuleInfo
|
||||
genmoduleinfo();
|
||||
|
||||
// emit function bodies
|
||||
sir->emitFunctionBodies();
|
||||
|
||||
// generate ModuleInfo
|
||||
genmoduleinfo();
|
||||
|
||||
// emit usedArray
|
||||
if (!ir.usedArray.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user