Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / cfi-vcall-no-trap.cpp
blob92ed322af60580902ccfe47d344f89eb325d72bd
1 // Only output llvm.assume(llvm.type.test()) if cfi-vcall is disabled and whole-program-vtables is enabled
2 // RUN: %clang_cc1 -flto -fvisibility=hidden -fsanitize=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CFI %s
3 // RUN: %clang_cc1 -flto -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOCFI %s
5 struct S1 {
6 virtual void f();
7 };
9 // CHECK: define{{.*}}s1f
10 // CHECK: llvm.type.test
11 // CFI-NOT: llvm.assume
12 // NOCFI: llvm.assume
13 void s1f(S1 *s1) {
14 s1->f();