[compiler-rt] r277632 - Add CFI tests for -lowertypetests-bitsets-level.
Ivan Krasin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 12:08:55 PDT 2016
Author: krasin
Date: Wed Aug 3 14:08:55 2016
New Revision: 277632
URL: http://llvm.org/viewvc/llvm-project?rev=277632&view=rev
Log:
Add CFI tests for -lowertypetests-bitsets-level.
Summary:
-lowertypetests-bitsets-level controls which kinds of bitsets
are generated, as introduced in r277556. This change adds tests
to compiler-rt.
Reviewers: kcc
Differential Revision: https://reviews.llvm.org/D23103
Modified:
compiler-rt/trunk/test/cfi/multiple-inheritance.cpp
compiler-rt/trunk/test/cfi/simple-pass.cpp
Modified: compiler-rt/trunk/test/cfi/multiple-inheritance.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/multiple-inheritance.cpp?rev=277632&r1=277631&r2=277632&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/multiple-inheritance.cpp (original)
+++ compiler-rt/trunk/test/cfi/multiple-inheritance.cpp Wed Aug 3 14:08:55 2016
@@ -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.
Modified: compiler-rt/trunk/test/cfi/simple-pass.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/simple-pass.cpp?rev=277632&r1=277631&r2=277632&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/simple-pass.cpp (original)
+++ compiler-rt/trunk/test/cfi/simple-pass.cpp Wed Aug 3 14:08:55 2016
@@ -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
More information about the llvm-commits
mailing list