diff options
Diffstat (limited to 'docs/DesignDocs/VisibilityMacros.rst')
| -rw-r--r-- | docs/DesignDocs/VisibilityMacros.rst | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/docs/DesignDocs/VisibilityMacros.rst b/docs/DesignDocs/VisibilityMacros.rst index 993ce2cca5fd..878566ea0bc1 100644 --- a/docs/DesignDocs/VisibilityMacros.rst +++ b/docs/DesignDocs/VisibilityMacros.rst @@ -40,11 +40,11 @@ Visibility Macros this macro therefore expands to `__declspec(dllexport)` when building the library and has an empty definition otherwise. -**_LIBCPP_INLINE_VISIBILITY** - Mark a function as hidden and force inlining whenever possible. - -**_LIBCPP_ALWAYS_INLINE** - A synonym for `_LIBCPP_INLINE_VISIBILITY` +**_LIBCPP_HIDE_FROM_ABI** + Mark a function as not being part of the ABI of any final linked image that + uses it, and also as being internal to each TU that uses that function. In + other words, the address of a function marked with this attribute is not + guaranteed to be the same across translation units. **_LIBCPP_TYPE_VIS** Mark a type's typeinfo, vtable and members as having default visibility. @@ -155,6 +155,22 @@ Visibility Macros versioning namespace. This allows throwing and catching some exception types between libc++ and libstdc++. +**_LIBCPP_INTERNAL_LINKAGE** + Mark the affected entity as having internal linkage (i.e. the `static` + keyword in C). This is only a best effort: when the `internal_linkage` + attribute is not available, we fall back to forcing the function to be + inlined, which approximates internal linkage since an externally visible + symbol is never generated for that function. This is an internal macro + used as an implementation detail by other visibility macros. Never mark + a function or a class with this macro directly. + +**_LIBCPP_ALWAYS_INLINE** + Forces inlining of the function it is applied to. For visibility purposes, + this macro is used to make sure that an externally visible symbol is never + generated in an object file when the `internal_linkage` attribute is not + available. This is an internal macro used by other visibility macros, and + it should not be used directly. + Links ===== |
