1 // Check the presense of interface symbols in compiled file.
2
3 // RUN: %clang -faddress-sanitizer -dead_strip -O2 %s -o %t.exe
4 // RUN: nm %t.exe | egrep " [TW] " | sed "s/.* T //" | sed "s/.* W //" \
5 // RUN: | grep "__asan_" | sed "s/___asan_/__asan_/" > %t.symbols
6 // RUN: cat %p/../../../include/sanitizer/asan_interface.h \
7 // RUN: | sed "s/\/\/.*//" | sed "s/typedef.*//" \
8 // RUN: | grep "__asan_.*(" | sed "s/.* __asan_/__asan_/;s/(.*//" \
9 // RUN: > %t.interface
10 // RUN: echo __asan_report_load1 >> %t.interface
11 // RUN: echo __asan_report_load2 >> %t.interface
12 // RUN: echo __asan_report_load4 >> %t.interface
13 // RUN: echo __asan_report_load8 >> %t.interface
14 // RUN: echo __asan_report_load16 >> %t.interface
15 // RUN: echo __asan_report_store1 >> %t.interface
16 // RUN: echo __asan_report_store2 >> %t.interface
17 // RUN: echo __asan_report_store4 >> %t.interface
18 // RUN: echo __asan_report_store8 >> %t.interface
19 // RUN: echo __asan_report_store16 >> %t.interface
20 // RUN: cat %t.interface | sort -u | diff %t.symbols -
21
main()22 int main() { return 0; }
23