mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-17 02:47:06 +02:00
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.
This commit is contained in:
@@ -130,6 +130,7 @@ Module::Module(char *filename, Identifier *ident, int doDocComment, int doHdrGen
|
||||
llvmForceLogging = false;
|
||||
this->doDocComment = doDocComment;
|
||||
this->doHdrGen = doHdrGen;
|
||||
uniqueId = 0;
|
||||
}
|
||||
|
||||
File* Module::buildFilePath(char* forcename, char* path, char* ext)
|
||||
@@ -1007,3 +1008,8 @@ DsymbolTable *Package::resolve(Array *packages, Dsymbol **pparent, Package **ppk
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
Identifier* Module::generateId(Identifier* id)
|
||||
{
|
||||
return Identifier::generateId(id->string, uniqueId++);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user