summaryrefslogtreecommitdiffstats
path: root/docs/LTOVisibility.rst
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-05-27 22:31:30 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-05-27 22:31:30 +0000
commita4b432f7a4c4458594d70bbb9501a5385a101412 (patch)
tree408835672cc675aebc147c4fdc04abca15aa6fa2 /docs/LTOVisibility.rst
parent515ac7a1d5c47c0c2d3506191197344f1f54092d (diff)
docs: Clarify that LTO visibility is based on source-level symbol visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LTOVisibility.rst')
-rw-r--r--docs/LTOVisibility.rst18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/LTOVisibility.rst b/docs/LTOVisibility.rst
index 21a3157c83..67367f3d63 100644
--- a/docs/LTOVisibility.rst
+++ b/docs/LTOVisibility.rst
@@ -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
of its definition, so it must be consistent between translation units.
-In translation units built with LTO, LTO visibility is based on symbol
-visibility or, on the Windows platform, the dllimport and dllexport
-attributes. When targeting non-Windows platforms, classes with a visibility
-other than hidden visibility receive public LTO visibility. When targeting
-Windows, classes with dllimport or dllexport attributes receive public LTO
-visibility. All other classes receive hidden LTO visibility. Classes with
-internal linkage (e.g. classes declared in unnamed namespaces) also receive
-hidden LTO visibility.
+In translation units built with LTO, LTO visibility is based on the
+class's symbol visibility as expressed at the source level (i.e. the
+``__attribute__((visibility("...")))`` attribute, or the ``-fvisibility=``
+flag) or, on the Windows platform, the dllimport and dllexport attributes. When
+targeting non-Windows platforms, classes with a visibility other than hidden
+visibility receive public LTO visibility. When targeting Windows, classes
+with dllimport or dllexport attributes receive public LTO visibility. All
+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
LTO visibility regardless of its object file visibility, linkage or other