summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test/dynamic_cast_stress.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename all of the tests in preparation for merging lit configs with libcxxJonathan Roelofs2015-01-211-79/+0
| | | | | | http://reviews.llvm.org/D7101 llvm-svn: 226691
* [libcxxabi] Refactor test timing logic and disable by default.Eric Fiselier2014-11-241-8/+6
| | | | | | | | | | | | | | | | | | Summary: When using LIT the timing output is entirely unused but introduces a dependency on `<chrono>`. When libc++ is built without a montonic clock this causes some of the tests to fail. This patch factors out all of the timing logic into `support/timer.hpp` and disables it by default. To enable the timing you must define `LIBCXXABI_TIME_TESTS`. Reviewers: mclow.lists, danalbert, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6391 llvm-svn: 222701
* More test cases concentrating on catching class types.Howard Hinnant2012-01-311-2/+2
| | | | llvm-svn: 149453
* Drop the stress a notch on dynamic_cast_stress.cpp. Otherwise it ↵Howard Hinnant2012-01-311-1/+1
| | | | | | occasionally causes clang to crash. Put a noexcept(false) on a throwing destructor in test_vector1.cpp. The test now passes for both C++03 and C++11 modes. Add testit script. All tests are now PASSING :-) llvm-svn: 149413
* One more small optimization: Where possible, for loops that do a search and ↵Howard Hinnant2012-01-161-4/+4
| | | | | | then try to break out of the loop early, eliminate the attempt to break out of the loop after the last search. And with that, I'm declaring __dynamic_cast done. Though if anyone sees any problems, has suggestions for improvements, or wants to contribute some test cases, that is certainly welcome feedback. llvm-svn: 148246
* I think this is getting close on __dynamic_cast. There's been quite a bit ↵Howard Hinnant2012-01-161-4/+4
| | | | | | of code rearrangement, renaming, and better commenting. This exercise has exposed and fixed a few more bugs. I've also added several more tests (there's definitely a need for more tests here). llvm-svn: 148227
* Enclosed is a stress test for dynamic_cast. It stresses both libc++abi, and ↵Howard Hinnant2012-01-131-0/+81
clang itself. It creates a ridiculously large class hierarchy using variadic templates. You can specify both the width and depth of the class hierarchy. And you can specify whether the cast is to the actual run time type, or to an intermediate layer in the class. About 1/3 of the time I compile this, it crashes the compiler. There seems to be an uninitialized area of memory, and I'm probably blowing past an assumption on class hierarchy size within clang (and understandably so). I can get it work most of the time with a class hierarchy width of 20 and a depth of 7. I'm making timings with both -O3 and -Os, using both cast to root and cast to intermediate, on both libc++abi, and gcc's dynamic_cast. I've put the results in a comment/table at the bottom of the test. llvm-svn: 148083
OpenPOWER on IntegriCloud