forked from OSchip/llvm-project
[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:
parent
1d3f4aefd6
commit
e92ab2fbd3
|
@ -1,3 +0,0 @@
|
|||
# Sources in this directory are helper files for tests which test functionality
|
||||
# involving multiple translation units.
|
||||
config.suffixes = []
|
|
@ -1,5 +0,0 @@
|
|||
#include "vptr-non-unique-typeinfo-lib.h"
|
||||
|
||||
X *libCall() {
|
||||
return new X;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
struct X {
|
||||
virtual ~X() {}
|
||||
};
|
||||
X *libCall();
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue