Skip to content

Commit dd676f3

Browse files
committed
Comment & whitespace fixes
1 parent 5e5728e commit dd676f3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

libcxx/docs/DesignDocs/VisibilityMacros.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Visibility Macros
4848
This macro works by applying `[[gnu::gnu_inline]] inline` to the funciton
4949
in the header, thereby suppressing code generation while still allowing the
5050
compiler to use the function for optimization purposes.
51-
During the build of libc++, we trigger code generation by not expanding the
52-
macro to `_LIBCPP_EXPORTED_FROM_ABI`. Since the function is no longer marked
53-
as `inline`, it will be emitted even if not called. (For this reason its
54-
paramount to not define methods in the class definition, since those definitions
55-
would be implicitly `inline`.)
51+
During the build of libc++, we trigger code generation by expanding the
52+
macro to `/*empty*/`. Since the function is no longer marked as `inline`,
53+
it will be emitted even if not called. (For this reason its paramount to
54+
not define methods in the class definition, since those definitions would
55+
be implicitly `inline`.)
5656

5757
**_LIBCPP_OVERRIDABLE_FUNC_VIS**
5858
Mark a symbol as being exported by the libc++ library, but allow it to be

libcxx/include/__exception/exception_ptr_glibcxx.ipp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ namespace std {
1313
// it uses to implement std::exception_ptr (which it declares as an alias of
1414
// std::__exception_ptr::exception_ptr) is not directly exported to clients. So
1515
// we have little choice but to hijack std::__exception_ptr::exception_ptr's
16-
// (which fortunately has the same layout as our std::exception_ptr) copy
17-
// constructor, assignment operator and destructor (which are part of its
18-
// stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr)
19-
// function.
16+
// _M_addref and _M_release (which are part of its ABI), and its
17+
// rethrow_exception(std::__exception_ptr::exception_ptr) function. Fortunately,
18+
// glibcxx's exception_ptr has the same layout as our exception_ptr and we can
19+
// reinterpret_cast between the two.
2020
namespace __exception_ptr {
2121

2222
struct exception_ptr {

0 commit comments

Comments
 (0)