[test/vptr-non-unique-typeinfo] Address Samsonov's post-commit review

Reviewers: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17783

llvm-svn: 262469
This commit is contained in:
Filipe Cabecinhas 2016-03-02 08:30:40 +00:00
parent 1d3f4aefd6
commit e92ab2fbd3
4 changed files with 15 additions and 14 deletions

View File

@ -1,3 +0,0 @@
# Sources in this directory are helper files for tests which test functionality
# involving multiple translation units.
config.suffixes = []

View File

@ -1,5 +0,0 @@
#include "vptr-non-unique-typeinfo-lib.h"
X *libCall() {
return new X;
}

View File

@ -1,4 +0,0 @@
struct X {
virtual ~X() {}
};
X *libCall();

View File

@ -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