Fixed the order of static destructors

This commit is contained in:
Alexey Prokhin
2010-12-30 14:04:24 +03:00
parent 6c2ccaf945
commit 8d7ff66019
3 changed files with 13 additions and 12 deletions

View File

@@ -511,7 +511,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
// shared static dtor
else if (fdecl->isSharedStaticDtorDeclaration()) {
if (mustDefineSymbol(fdecl)) {
gIR->sharedDtors.push_back(fdecl);
gIR->sharedDtors.push_front(fdecl);
}
} else
#endif
@@ -524,7 +524,7 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
// static dtor
else if (fdecl->isStaticDtorDeclaration()) {
if (mustDefineSymbol(fdecl)) {
gIR->dtors.push_back(fdecl);
gIR->dtors.insert(gIR->dtors.begin(), fdecl);
}
}