aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-11-13 09:05:12 +0000
committerHans Wennborg <hans@hanshq.net>2018-11-13 09:05:12 +0000
commit7717a5cd8c97f20ef8c0bea0493edb309987420b (patch)
tree8e400e4acf055438707307d3504e9ba19b9a1fd0 /clang/docs
parent9596848037a2473f59404c4e01a09105ceaf7fc3 (diff)
UserManual: Tweak the /Zc:dllexportInlines- docs some
Addressing comments on https://reviews.llvm.org/D54319 llvm-svn: 346748
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/UsersManual.rst15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index a7f2f8145e87..9317815efca6 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -2947,8 +2947,8 @@ Execute ``clang-cl /?`` to see a list of supported options:
/Yc<filename> Generate a pch file for all code up to and including <filename>
/Yu<filename> Load a pch file and use it instead of all code up to and including <filename>
/Z7 Enable CodeView debug information in object files
- /Zc:dllexportInlines- Don't dllexport/import inline member functions of dllexport/import classes
- /Zc:dllexportInlines dllexport/import inline member functions of dllexport/import classes (default)
+ /Zc:dllexportInlines- Don't dllexport/dllimport inline member functions of dllexport/import classes
+ /Zc:dllexportInlines dllexport/dllimport inline member functions of dllexport/import classes (default)
/Zc:sizedDealloc- Disable C++14 sized global deallocation functions
/Zc:sizedDealloc Enable C++14 sized global deallocation functions
/Zc:strictStrings Treat string literals as const
@@ -3101,10 +3101,10 @@ line.
The /Zc:dllexportInlines- Option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-This causes the class-level `dllexport` and `dllimport` attributes not to be
-applied to inline member functions, as they otherwise would. For example, in
-the code below `S::foo()` would normally be defined and exported by the DLL,
-but when using the ``/Zc:dllexportInlines-`` flag it is not:
+This causes the class-level `dllexport` and `dllimport` attributes to not apply
+to inline member functions, as they otherwise would. For example, in the code
+below `S::foo()` would normally be defined and exported by the DLL, but when
+using the ``/Zc:dllexportInlines-`` flag it is not:
.. code-block:: c
@@ -3170,7 +3170,8 @@ different instance of that variable than in the DLL:
}
This could lead to very subtle bugs. Using ``-fvisibility-inlines-hidden`` can
-lead to the same issue.
+lead to the same issue. To avoid it in this case, make `S::foo()` or
+`internal()` non-inline, or mark them `dllimport/dllexport` explicitly.
The /fallback Option
^^^^^^^^^^^^^^^^^^^^