summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/cfi-ms-rtti.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/cfi-ms-rtti.cpp')
-rw-r--r--test/CodeGenCXX/cfi-ms-rtti.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cfi-ms-rtti.cpp b/test/CodeGenCXX/cfi-ms-rtti.cpp
new file mode 100644
index 0000000..5203a6b
--- /dev/null
+++ b/test/CodeGenCXX/cfi-ms-rtti.cpp
@@ -0,0 +1,12 @@
+// 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}
OpenPOWER on IntegriCloud