Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
4 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
compiler-rt/test/ubsan/TestCases/TypeCheck/Helpers/lit.local.cfg
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
compiler-rt/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.cpp
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
compiler-rt/test/ubsan/TestCases/TypeCheck/Helpers/vptr-non-unique-typeinfo-lib.h
This file was deleted.
Oops, something went wrong.
17 changes: 15 additions & 2 deletions
17
compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |