[NFC][compiler-rt][hwasan] Move allocation functions into their own file
authorLeonard Chan <leonardchan@google.com>
Mon, 7 Jun 2021 22:35:28 +0000 (15:35 -0700)
committerLeonard Chan <leonardchan@google.com>
Tue, 8 Jun 2021 19:08:23 +0000 (12:08 -0700)
commit944b3c53aec54c205d6898ffca548a484309e139
treefaf1c375d7e9a57b0222ea6e349a31f1c90c81cb
parent0e8506debae3ad534b4eecfa922fc6281506a635
[NFC][compiler-rt][hwasan] Move allocation functions into their own file

This removes the `__sanitizer_*` allocation function definitions from
`hwasan_interceptors.cpp` and moves them into their own file. This way
implementations that do not use interceptors at all can just ignore
(almost) everything in `hwasan_interceptors.cpp`.

Also remove some unused headers in `hwasan_interceptors.cpp` after the move.

Differential Revision: https://reviews.llvm.org/D103564
compiler-rt/lib/hwasan/CMakeLists.txt
compiler-rt/lib/hwasan/hwasan.h
compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp [new file with mode: 0644]
compiler-rt/lib/hwasan/hwasan_interceptors.cpp