[compiler-rt] Unify Linux and *BSD interceptors more
authorMarco Elver <elver@google.com>
Thu, 25 May 2023 09:07:55 +0000 (11:07 +0200)
committerMarco Elver <elver@google.com>
Thu, 25 May 2023 10:01:10 +0000 (12:01 +0200)
commit19b137f0c2be6955f2712d2f79b72aebed5feb42
tree5962cc762c7ca444fcdf99bb586c1f81d32291ef
parent15711bd631894985c1342953747e77ffc091a4f3
[compiler-rt] Unify Linux and *BSD interceptors more

The Linux and *BSD interceptors are almost identical, except for *BSD,
where the overridden intercepted function is not defined weak due to
some incompliant linker behaviour.

Since most of the interception machinery is shared between Linux and
*BSD (see INTERCEPT_FUNCTION macro), it makes sense to unify interceptor
definition and declarations as much as possible to ease future changes.

NFC.

Reviewed By: dvyukov, vitalybuka

Differential Revision: https://reviews.llvm.org/D151318
compiler-rt/lib/interception/interception.h