Lines Matching refs:LTO

2 LTO Visibility
5 *LTO visibility* is a property of an entity that specifies whether it can be
6 referenced from outside the current LTO unit. A *linkage unit* is a set of
8 unit's *LTO unit* is the subset of the linkage unit that is linked together
9 using link-time optimization; in the case where LTO is not being used, the
10 linkage unit's LTO unit is empty. Each linkage unit has only a single LTO unit.
12 The LTO visibility of a class is used by the compiler to determine which
20 violation to define a class with hidden LTO visibility in multiple linkage
21 units. A class with public LTO visibility may be defined in multiple linkage
23 control flow integrity features can only be applied to classes with hidden LTO
24 visibility. A class's LTO visibility is treated as an ODR-relevant property
27 In translation units built with LTO, LTO visibility is based on the
32 visibility receive public LTO visibility. When targeting Windows, classes
33 with dllimport or dllexport attributes receive public LTO visibility. All
34 other classes receive hidden LTO visibility. Classes with internal linkage
35 (e.g. classes declared in unnamed namespaces) also receive hidden LTO
38 A class defined in a translation unit built without LTO receives public
39 LTO visibility regardless of its object file visibility, linkage or other
43 two cases where it may wrongly infer hidden LTO visibility.
46 combination of LTO object files and non-LTO object files, any hidden
47 visibility class defined in both a translation unit built with LTO and
48 a translation unit built without LTO must be defined with public LTO
55 used in this way must be defined with public LTO visibility.
60 LTO visibility. On Windows platforms, clang-cl's ``/MT`` and ``/MTd``
62 these flags imply public LTO visibility for every class declared in the
68 The following example shows how LTO visibility works in practice in several
77 …| | LTO unit (clang++ -fvisibility=hidden -flto): | | | virtual void f(); …
94 We will now describe the LTO visibility of each of the classes defined in
97 Class ``A`` is not defined outside of ``main``'s LTO unit, so it can have
98 hidden LTO visibility. This is inferred from the object file visibility
101 Class ``B`` is defined in ``main``, both inside and outside its LTO unit. The
102 definition outside the LTO unit has public LTO visibility, so the definition
103 inside the LTO unit must also have public LTO visibility in order to avoid
107 have public LTO visibility. This is correctly inferred from the ``visibility``
112 ``D`` in ``main``'s LTO unit must have public LTO visibility in order to be