Skip to content

Commit e829963

Browse files
authored
[libc++][NFC] Update the documentation for _LIBCPP_OVERRIDABLE_FUNCTION (#140121)
1 parent e5f8998 commit e829963

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/src/include/overridable_function.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@
2929
// This is a low-level utility which does not work on all platforms, since it needs
3030
// to make assumptions about the object file format in use. Furthermore, it requires
3131
// the "base definition" of the function (the one we want to check whether it has been
32-
// overridden) to be annotated with the _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE macro.
32+
// overridden) to be defined using the _LIBCPP_OVERRIDABLE_FUNCTION macro.
3333
//
3434
// This currently works with Mach-O files (used on Darwin) and with ELF files (used on Linux
3535
// and others). On platforms where we know how to implement this detection, the macro
3636
// _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION is defined to 1, and it is defined to 0 on
37-
// other platforms. The _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE macro is defined to
38-
// nothing on unsupported platforms so that it can be used to decorate functions regardless
39-
// of whether detection is actually supported.
37+
// other platforms. The _LIBCPP_OVERRIDABLE_FUNCTION macro is defined to perform a normal
38+
// function definition on unsupported platforms so that it can be used to define functions
39+
// regardless of whether detection is actually supported.
4040
//
4141
// How does this work?
4242
// -------------------
4343
//
4444
// Let's say we want to check whether a weak function `f` has been overridden by the user.
4545
// The general mechanism works by placing `f`'s definition (in the libc++ built library)
4646
// inside a special section, which we do using the `__section__` attribute via the
47-
// _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE macro.
47+
// _LIBCPP_OVERRIDABLE_FUNCTION macro.
4848
//
4949
// Then, when comes the time to check whether the function has been overridden, we take
5050
// the address of the function and we check whether it falls inside the special function

0 commit comments

Comments
 (0)