[compiler-rt] r262469 - [test/vptr-non-unique-typeinfo] Address Samsonov's post-commit review
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 00:30:41 PST 2016
Author: filcab
Date: Wed Mar 2 02:30:40 2016
New Revision: 262469
URL: http://llvm.org/viewvc/llvm-project?rev=262469&view=rev
Log:
[test/vptr-non-unique-typeinfo] Address Samsonov's post-commit review
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17783
Removed:
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h
Modified:
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
Removed: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg?rev=262468&view=auto
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg (removed)
@@ -1,3 +0,0 @@
-# Sources in this directory are helper files for tests which test functionality
-# involving multiple translation units.
-config.suffixes = []
Removed: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp?rev=262468&view=auto
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp (removed)
@@ -1,5 +0,0 @@
-#include "vptr-non-unique-typeinfo-lib.h"
-
-X *libCall() {
- return new X;
-}
Removed: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h?rev=262468&view=auto
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h (removed)
@@ -1,4 +0,0 @@
-struct X {
- virtual ~X() {}
-};
-X *libCall();
Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp?rev=262469&r1=262468&r2=262469&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp Wed Mar 2 02:30:40 2016
@@ -1,12 +1,25 @@
-// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -I%p/Helpers %p/Helpers/vptr-non-unique-typeinfo-lib.cpp -fPIC -shared -o %t-lib.so
+// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -I%p/Helpers -g %s -fPIC -shared -o %t-lib.so -DBUILD_SO
// RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr -I%p/Helpers -g %s -O3 -o %t %t-lib.so
// RUN: %run %t
//
// REQUIRES: cxxabi
-#include "vptr-non-unique-typeinfo-lib.h"
+struct X {
+ virtual ~X() {}
+};
+X *libCall();
+
+#ifdef BUILD_SO
+
+X *libCall() {
+ return new X;
+}
+
+#else
int main() {
X *px = libCall();
delete px;
}
+
+#endif
More information about the llvm-commits
mailing list