• Home
  • Raw
  • Download

Lines Matching full:visibility

2 LTO Visibility
5 *LTO visibility* is a property of an entity that specifies whether it can be
12 The LTO visibility of a class is used by the compiler to determine which
19 ODR violation to define a class with hidden LTO visibility in multiple linkage
20 units. A class with public LTO visibility may be defined in multiple linkage
23 visibility. A class's LTO visibility is treated as an ODR-relevant property
26 In translation units built with LTO, LTO visibility is based on the
27 class's symbol visibility as expressed at the source level (i.e. the
28 ``__attribute__((visibility("...")))`` attribute, or the ``-fvisibility=``
30 targeting non-Windows platforms, classes with a visibility other than hidden
31 visibility receive public LTO visibility. When targeting Windows, classes
32 with dllimport or dllexport attributes receive public LTO visibility. All
33 other classes receive hidden LTO visibility. Classes with internal linkage
35 visibility.
38 LTO visibility regardless of its object file visibility, linkage or other
42 two cases where it may wrongly infer hidden LTO visibility.
46 visibility class defined in both a translation unit built with LTO and
48 visibility in order to avoid an ODR violation.
51 visibility attributes in multiple linkage units and have virtual calls
54 used in this way must be defined with public LTO visibility.
59 LTO visibility. On Windows platforms, clang-cl's ``/MT`` and ``/MTd``
61 these flags imply public LTO visibility for every class declared in the
67 The following example shows how LTO visibility works in practice in several
75 …----------------------------------------+ | | struct __attribute__((visibility("default"))) C {…
80 …| | struct __attribute__((visibility("default"))) C { | | | virtual void g() = 0; …
85 …| | }; | | | __attribute__(visibility("defaul…
93 We will now describe the LTO visibility of each of the classes defined in
97 hidden LTO visibility. This is inferred from the object file visibility
101 definition outside the LTO unit has public LTO visibility, so the definition
102 inside the LTO unit must also have public LTO visibility in order to avoid
106 have public LTO visibility. This is correctly inferred from the ``visibility``
111 ``D`` in ``main``'s LTO unit must have public LTO visibility in order to be