1// RUN: %clangxx_hwasan -mllvm -hwasan-instrument-with-calls=1 -O0 %s -o %t
2// RUN: %clangxx_hwasan -mllvm -hwasan-instrument-with-calls=1 -O0 %s -o %t -fsanitize-recover=hwaddress
3
4// Utilizes all flavors of __hwasan_load/store interface functions to verify
5// that the instrumentation and the interface provided by HWASan do match.
6// In case of a discrepancy, this test fails to link.
7
8#include <sanitizer/hwasan_interface.h>
9
10#define F(T) void f_##T(T *a, T *b) { *a = *b; }
11
12F(uint8_t)
13F(uint16_t)
14F(uint32_t)
15F(uint64_t)
16
17typedef unsigned V32 __attribute__((__vector_size__(32)));
18F(V32)
19
20int main() {}
21

source code of compiler-rt/test/hwasan/TestCases/check-interface.cpp