[clang] [clang] Improve the documentation for the init_priority attribute (PR #123098)
Steven Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 15 10:15:54 PST 2025
================
@@ -136,12 +137,18 @@ relative ordering of values is important. For example:
``Obj2`` will be initialized *before* ``Obj1`` despite the usual order of
initialization being the opposite.
+Note that this attribute does not control the initialization order of objects
+across final linked image boundaries like shared objects and executables.
+
On Windows, ``init_seg(compiler)`` is represented with a priority of 200 and
``init_seg(library)`` is represented with a priority of 400. ``init_seg(user)``
uses the default 65535 priority.
This attribute is only supported for C++ and Objective-C++ and is ignored in
other language modes. Currently, this attribute is not implemented on z/OS.
+This attribute also does not control the order of initialization across
----------------
cachemeifyoucan wrote:
I will lift this to be a parallel paragraph above:
```
On Windows, ....
On MachO platforms, ....
```
https://github.com/llvm/llvm-project/pull/123098
More information about the cfe-commits
mailing list