[cfe-commits] Fix init_priority behaviour (PR11480) + test-case
Stepan Dyatkovskiy
stpworld at narod.ru
Sat Aug 11 04:52:30 PDT 2012
Hi all. Please find update patch for pr11480.
I made all as it was proposed by Anton in bug description:
http://llvm.org/bugs/show_bug.cgi?id=11480#c0
So, main changes are in EmitCXXGlobalInitFunc and EmitCXXGlobalDtorFunc.
For ctors/dtors with init_priority attribute I just generate separated
init functions instead of single one. The exception is case when there
are some ctors/dtors with same priority. In that case I put its
invokation into a single init/dtor function, in order determined by its
order in code.
I also changed CGCXXABI::registerGlobalDtor. I added VarDecl parameter
here, since we need to now additional attributes of variable for which
it is registered (init_priority for example).
The test-case was also included into the patch.
-Stepan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr11480-4.patch
Type: text/x-patch
Size: 13877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120811/e08d2978/attachment.bin>
More information about the cfe-commits
mailing list