docs: Clarify that LTO visibility is based on source-level symbol visibility.

llvm-svn: 271063
This commit is contained in:
Peter Collingbourne 2016-05-27 22:31:30 +00:00
parent e897edbd36
commit b0195f28d7
1 changed files with 10 additions and 8 deletions

View File

@ -23,14 +23,16 @@ control flow integrity features can only be applied to classes with hidden LTO
visibility. A class's LTO visibility is treated as an ODR-relevant property visibility. A class's LTO visibility is treated as an ODR-relevant property
of its definition, so it must be consistent between translation units. of its definition, so it must be consistent between translation units.
In translation units built with LTO, LTO visibility is based on symbol In translation units built with LTO, LTO visibility is based on the
visibility or, on the Windows platform, the dllimport and dllexport class's symbol visibility as expressed at the source level (i.e. the
attributes. When targeting non-Windows platforms, classes with a visibility ``__attribute__((visibility("...")))`` attribute, or the ``-fvisibility=``
other than hidden visibility receive public LTO visibility. When targeting flag) or, on the Windows platform, the dllimport and dllexport attributes. When
Windows, classes with dllimport or dllexport attributes receive public LTO targeting non-Windows platforms, classes with a visibility other than hidden
visibility. All other classes receive hidden LTO visibility. Classes with visibility receive public LTO visibility. When targeting Windows, classes
internal linkage (e.g. classes declared in unnamed namespaces) also receive with dllimport or dllexport attributes receive public LTO visibility. All
hidden LTO visibility. other classes receive hidden LTO visibility. Classes with internal linkage
(e.g. classes declared in unnamed namespaces) also receive hidden LTO
visibility.
A class defined in a translation unit built without LTO receives public A class defined in a translation unit built without LTO receives public
LTO visibility regardless of its object file visibility, linkage or other LTO visibility regardless of its object file visibility, linkage or other