Mercurial > projects > ldc
comparison gen/structs.cpp @ 1155:ba9d6292572a
Fixed forward reference problem in struct methods on x86-64.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Sat, 28 Mar 2009 09:00:32 +0100 |
parents | 3cf0066e6faf |
children | 79758fd2f48a |
comparison
equal
deleted
inserted
replaced
1154:9279a9dc6df3 | 1155:ba9d6292572a |
---|---|
12 #include "gen/llvmhelpers.h" | 12 #include "gen/llvmhelpers.h" |
13 #include "gen/arrays.h" | 13 #include "gen/arrays.h" |
14 #include "gen/logger.h" | 14 #include "gen/logger.h" |
15 #include "gen/structs.h" | 15 #include "gen/structs.h" |
16 #include "gen/dvalue.h" | 16 #include "gen/dvalue.h" |
17 #include "gen/functions.h" | |
17 | 18 |
18 #include "ir/irstruct.h" | 19 #include "ir/irstruct.h" |
19 | 20 |
20 ////////////////////////////////////////////////////////////////////////////////////////// | 21 ////////////////////////////////////////////////////////////////////////////////////////// |
21 | 22 |
581 // name type | 582 // name type |
582 if (sd->parent->isModule()) { | 583 if (sd->parent->isModule()) { |
583 gIR->module->addTypeName(sd->mangle(),ST); | 584 gIR->module->addTypeName(sd->mangle(),ST); |
584 } | 585 } |
585 | 586 |
587 // emit functions | |
588 size_t n = irstruct->structFuncs.size(); | |
589 for (size_t i = 0; i < n; ++i) | |
590 { | |
591 DtoResolveFunction(irstruct->structFuncs[i]); | |
592 } | |
593 irstruct->structFuncs.clear(); | |
594 | |
586 gIR->structs.pop_back(); | 595 gIR->structs.pop_back(); |
587 | 596 |
588 DtoDeclareStruct(sd); | 597 DtoDeclareStruct(sd); |
589 } | 598 } |
590 | 599 |