Skip to content

Commit f07ecb8

Browse files
committed
docs: Use the term "whole-program devirtualization" instead of "virtual function call optimization".
The former term is probably more familiar to users. Also add references to the command line flags used to enable the features described in the doc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299902 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c84d5c0 commit f07ecb8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/LTOVisibility.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ using link-time optimization; in the case where LTO is not being used, the
1010
linkage unit's LTO unit is empty. Each linkage unit has only a single LTO unit.
1111

1212
The LTO visibility of a class is used by the compiler to determine which
13-
classes the virtual function call optimization and control flow integrity
14-
features apply to. These features use whole-program information, so they
15-
require the entire class hierarchy to be visible in order to work correctly.
16-
17-
If any translation unit in the program uses either of the virtual function
18-
call optimization or control flow integrity features, it is effectively an
19-
ODR violation to define a class with hidden LTO visibility in multiple linkage
13+
classes the whole-program devirtualization (``-fwhole-program-vtables``) and
14+
control flow integrity (``-fsanitize=cfi-vcall``) features apply to. These
15+
features use whole-program information, so they require the entire class
16+
hierarchy to be visible in order to work correctly.
17+
18+
If any translation unit in the program uses either of the whole-program
19+
devirtualization or control flow integrity features, it is effectively an ODR
20+
violation to define a class with hidden LTO visibility in multiple linkage
2021
units. A class with public LTO visibility may be defined in multiple linkage
21-
units, but the tradeoff is that the virtual function call optimization and
22+
units, but the tradeoff is that the whole-program devirtualization and
2223
control flow integrity features can only be applied to classes with hidden LTO
2324
visibility. A class's LTO visibility is treated as an ODR-relevant property
2425
of its definition, so it must be consistent between translation units.

0 commit comments

Comments
 (0)