1 // RUN: %clangxx_cfi %debug_info_flags -fsanitize-stats -o %t %s
2 // RUN: env SANITIZER_STATS_PATH=%t.stats %run %t
3 // RUN: sanstats %t.stats | FileCheck %s
5 // FIXME: We currently emit the wrong debug info under devirtualization.
8 // FIXME: %t.stats must be transferred from device to host for this to work on Android.
18 extern "C" __attribute__((noinline
)) void vcall(A
*a
) {
19 // CHECK: stats.cpp:[[@LINE+1]] {{_?}}vcall cfi-vcall 37
23 extern "C" __attribute__((noinline
)) void nvcall(A
*a
) {
24 // CHECK: stats.cpp:[[@LINE+1]] {{_?}}nvcall cfi-nvcall 51
28 extern "C" __attribute__((noinline
)) A
*dcast(A
*a
) {
29 // CHECK: stats.cpp:[[@LINE+1]] {{_?}}dcast cfi-derived-cast 24
30 return (A
*)(ABase
*)a
;
33 extern "C" __attribute__((noinline
)) A
*ucast(A
*a
) {
34 // CHECK: stats.cpp:[[@LINE+1]] {{_?}}ucast cfi-unrelated-cast 81
35 return (A
*)(char *)a
;
38 extern "C" __attribute__((noinline
)) void unreachable(A
*a
) {
39 // CHECK-NOT: unreachable
45 for (unsigned i
= 0; i
!= 37; ++i
)
47 for (unsigned i
= 0; i
!= 51; ++i
)
49 for (unsigned i
= 0; i
!= 24; ++i
)
51 for (unsigned i
= 0; i
!= 81; ++i
)
53 for (unsigned i
= 0; i
!= 0; ++i
)