llvm-project/clang/test/CodeGenCXX/cfi-speculative-vtable.cpp
Arthur Eubanks 29363f80a8 [test] Remove various legacy pass manager tests
The new PM been the default for a while and we're in the process of removing the legacy PM optimization pipeline.
2022-04-11 14:02:17 -07:00

15 lines
629 B
C++

// Test that we don't emit a bit set entry for a speculative (available_externally) vtable.
// This does not happen in the Microsoft ABI.
// RUN: %clang_cc1 -triple x86_64-unknown-linux -O1 -disable-llvm-passes -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux -O1 -disable-llvm-passes -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fsanitize-cfi-cross-dso -emit-llvm -o - %s | FileCheck %s
class A {
public:
virtual ~A();
};
A a;
// CHECK: @_ZTV1A ={{.*}} available_externally
// CHECK-NOT: !{{.*}} = !{!{{.*}}, [4 x i8*]* @_ZTV1A, i64 16}