hwasan: refactor order of macros in hwasan_platform_interceptors.h [NFC]
authorThurston Dang <thurston@google.com>
Wed, 24 May 2023 20:19:34 +0000 (20:19 +0000)
committerThurston Dang <thurston@google.com>
Thu, 25 May 2023 00:12:44 +0000 (00:12 +0000)
commit5be5746b6eac315866ddf53c20e21decc30ce682
treeabec826678e3033932f6da967bd520ea7b2d1edf
parent8826cd57825d829121ad7fb73fab0a6cf30f29f6
hwasan: refactor order of macros in hwasan_platform_interceptors.h [NFC]

Currently, the header file contains all the undefs, followed by all the
define X 0. This will be inconvenient for re-enabling interceptors,
because we would need to comment out (or delete) the corresponding macros
in two different places.

This patch groups together the macros for each function.

Additionally, it adds the suggestion that interceptors should be
re-enabled by commenting out (not deleting) the macros.

Differential Revision: https://reviews.llvm.org/D151371
compiler-rt/lib/hwasan/hwasan_platform_interceptors.h