mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Fixed forward reference problem in struct methods on x86-64.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "gen/logger.h"
|
||||
#include "gen/structs.h"
|
||||
#include "gen/dvalue.h"
|
||||
#include "gen/functions.h"
|
||||
|
||||
#include "ir/irstruct.h"
|
||||
|
||||
@@ -583,6 +584,14 @@ void DtoResolveStruct(StructDeclaration* sd)
|
||||
gIR->module->addTypeName(sd->mangle(),ST);
|
||||
}
|
||||
|
||||
// emit functions
|
||||
size_t n = irstruct->structFuncs.size();
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
{
|
||||
DtoResolveFunction(irstruct->structFuncs[i]);
|
||||
}
|
||||
irstruct->structFuncs.clear();
|
||||
|
||||
gIR->structs.pop_back();
|
||||
|
||||
DtoDeclareStruct(sd);
|
||||
|
||||
Reference in New Issue
Block a user