Mercurial > projects > ldc
comparison dmd/module.c @ 956:369996c08420
Change the numbering of static ctors/dtors to be module based instead of being global.
This fixes #210 by making sure that the static ctor always gets the same
number, regardless of the order of the modules given at the command line.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 15 Feb 2009 11:46:28 +0100 |
parents | 330f999ade44 |
children | 31bbc7f3b817 |
comparison
equal
deleted
inserted
replaced
955:8a70b4381369 | 956:369996c08420 |
---|---|
128 | 128 |
129 // LDC | 129 // LDC |
130 llvmForceLogging = false; | 130 llvmForceLogging = false; |
131 this->doDocComment = doDocComment; | 131 this->doDocComment = doDocComment; |
132 this->doHdrGen = doHdrGen; | 132 this->doHdrGen = doHdrGen; |
133 uniqueId = 0; | |
133 } | 134 } |
134 | 135 |
135 File* Module::buildFilePath(char* forcename, char* path, char* ext) | 136 File* Module::buildFilePath(char* forcename, char* path, char* ext) |
136 { | 137 { |
137 char *argobj; | 138 char *argobj; |
1005 *pparent = parent; | 1006 *pparent = parent; |
1006 } | 1007 } |
1007 } | 1008 } |
1008 return dst; | 1009 return dst; |
1009 } | 1010 } |
1011 | |
1012 Identifier* Module::generateId(Identifier* id) | |
1013 { | |
1014 return Identifier::generateId(id->string, uniqueId++); | |
1015 } |