We were previously creating bit set entries at virtual table offset sizeof(void*) unconditionally under the Microsoft C++ ABI. This is incorrect if RTTI data is disabled; in that case the "address point" is at offset 0. This change modifies bit set emission to take into account whether RTTI data is being emitted. Also make a start on a blacklisting scheme for records. Differential Revision: http://reviews.llvm.org/D11048 llvm-svn: 241845
13 lines
403 B
C++
13 lines
403 B
C++
// RUN: %clang_cc1 -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-vcall | FileCheck --check-prefix=RTTI %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-vcall -fno-rtti-data | FileCheck --check-prefix=NO-RTTI %s
|
|
|
|
struct A {
|
|
A();
|
|
virtual void f() {}
|
|
};
|
|
|
|
A::A() {}
|
|
|
|
// RTTI: !{!"A@@", [2 x i8*]* {{.*}}, i64 8}
|
|
// NO-RTTI: !{!"A@@", [1 x i8*]* {{.*}}, i64 0}
|