1 // RUN: %clang_cc1 -flto -triple x86_64-unknown-linux -fsanitize=cfi-vcall -fsanitize-cfi-cross-dso -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=ITANIUM %s
2 // RUN: %clang_cc1 -flto -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-cfi-cross-dso -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=MS %s
29 // MS: @[[B_VTABLE:.*]] = private unnamed_addr constant { [2 x ptr] } {{.*}}@"??_R4B@?A0x{{[^@]*}}@@6B@"{{.*}}@"?f@B@?A0x{{[^@]*}}@@UEAAXXZ"
31 // CHECK-LABEL: caller
32 // CHECK: %[[A:.*]] = load ptr, ptr
33 // CHECK: %[[VT:.*]] = load ptr, ptr %[[A]]
34 // ITANIUM: %[[TEST:.*]] = call i1 @llvm.type.test(ptr %[[VT]], metadata !"_ZTS1A"), !nosanitize
35 // MS: %[[TEST:.*]] = call i1 @llvm.type.test(ptr %[[VT]], metadata !"?AUA@@"), !nosanitize
36 // CHECK: br i1 %[[TEST]], label %[[CONT:.*]], label %[[SLOW:.*]], {{.*}} !nosanitize
38 // ITANIUM: call void @__cfi_slowpath_diag(i64 7004155349499253778, ptr %[[VT]], {{.*}}) {{.*}} !nosanitize
39 // MS: call void @__cfi_slowpath_diag(i64 -8005289897957287421, ptr %[[VT]], {{.*}}) {{.*}} !nosanitize
40 // CHECK: br label %[[CONT]], !nosanitize
42 // CHECK: call void %{{.*}}(ptr {{[^,]*}} %{{.*}})
44 // No hash-based bit set entry for (anonymous namespace)::B
45 // ITANIUM-NOT: !{i64 {{.*}}, ptr @_ZTVN12_GLOBAL__N_11BE,
46 // MS-NOT: !{i64 {{.*}}, ptr @[[B_VTABLE]],