summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/cfi/multiple-inheritance.cpp12
-rw-r--r--compiler-rt/test/cfi/simple-pass.cpp6
2 files changed, 18 insertions, 0 deletions
diff --git a/compiler-rt/test/cfi/multiple-inheritance.cpp b/compiler-rt/test/cfi/multiple-inheritance.cpp
index a3b2ac56f63..5ef4b475826 100644
--- a/compiler-rt/test/cfi/multiple-inheritance.cpp
+++ b/compiler-rt/test/cfi/multiple-inheritance.cpp
@@ -22,6 +22,18 @@
// RUN: %t6 2>&1 | FileCheck --check-prefix=CFI-DIAG2 %s
// RUN: %t6 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s
+// RUN: %clangxx_cfi_diag -Wl,-plugin-opt,--lowertypetests-bitsets-level=0 -o %t7 %s
+// RUN: %t7 2>&1 | FileCheck --check-prefix=NCFI %s
+// RUN: %t7 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s
+
+// RUN: %clangxx_cfi_diag -Wl,-plugin-opt,--lowertypetests-bitsets-level=1 -o %t8 %s
+// RUN: %t8 2>&1 | FileCheck --check-prefix=CFI-DIAG2 %s
+// RUN: %t8 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s
+
+// RUN: %clangxx_cfi_diag -Wl,-plugin-opt,--lowertypetests-bitsets-level=2 -o %t9 %s
+// RUN: %t9 2>&1 | FileCheck --check-prefix=CFI-DIAG2 %s
+// RUN: %t9 x 2>&1 | FileCheck --check-prefix=CFI-DIAG1 %s
+
// Tests that the CFI mechanism is sensitive to multiple inheritance and only
// permits calls via virtual tables for the correct base class.
diff --git a/compiler-rt/test/cfi/simple-pass.cpp b/compiler-rt/test/cfi/simple-pass.cpp
index 4d856eb48ce..d1548e3fde5 100644
--- a/compiler-rt/test/cfi/simple-pass.cpp
+++ b/compiler-rt/test/cfi/simple-pass.cpp
@@ -1,5 +1,11 @@
// RUN: %clangxx_cfi -o %t %s
// RUN: %t
+// RUN: %clangxx_cfi -Wl,-plugin-opt,--lowertypetests-bitsets-level=0 -o %t2 %s
+// RUN: %t2
+// RUN: %clangxx_cfi -Wl,-plugin-opt,--lowertypetests-bitsets-level=1 -o %t3 %s
+// RUN: %t3
+// RUN: %clangxx_cfi -Wl,-plugin-opt,--lowertypetests-bitsets-level=2 -o %t4 %s
+// RUN: %t4
// Tests that the CFI mechanism does not crash the program when making various
// kinds of valid calls involving classes with various different linkages and
OpenPOWER on IntegriCloud