[NFC][compiler-rt][hwasan] Refactor hwasan functions
authorLeonard Chan <leonardchan@google.com>
Thu, 3 Jun 2021 21:22:37 +0000 (14:22 -0700)
committerLeonard Chan <leonardchan@google.com>
Thu, 3 Jun 2021 21:26:35 +0000 (14:26 -0700)
commitd4e4799998b830c2e41dee93a204870aa65083cf
tree1e2df8ea99c87bac8c148092813c63916ed24c66
parentac9641753bba836f2c22e0a2366b5233788d50b3
[NFC][compiler-rt][hwasan] Refactor hwasan functions

This moves the implementations for HandleTagMismatch, __hwasan_tag_mismatch4,
and HwasanAtExit from hwasan_linux.cpp to hwasan.cpp and declares them in hwasan.h.
This way, calls to those functions can be shared with the fuchsia implementation
without duplicating code.

Differential Revision: https://reviews.llvm.org/D103562
compiler-rt/lib/hwasan/hwasan.cpp
compiler-rt/lib/hwasan/hwasan.h
compiler-rt/lib/hwasan/hwasan_linux.cpp