DHowett-MSFT added inline comments.
================
Comment at: lib/CodeGen/CGBlocks.cpp:1276
+ InitVar->setSection(".CRT$XCLa");
+ CGM.addUsedGlobal(InitVar);
+ }
----------------
rjmccall wrote:
> Is the priority system not good enough?
My reading of the LLVM language reference leads me to believe it’s only ordered
per-module. If that’s the case, the benefit of emitting into `XC*` is that it
provides guaranteed order over all linker input.
`llvm.global_ctors` excerpt:
> The functions referenced by this array will be called in ascending order of
> priority (i.e. lowest first) when the module is loaded.
Now if the priority system _is_ guaranteed over all linker input, will that
guarantee hold for mixed Clang and CL objects?
Repository:
rC Clang
https://reviews.llvm.org/D50144
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits