summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* tuple: Make operator<() linear instead of exponentialDuncan P. N. Exon Smith2015-01-211-2/+6
| | | | | | Patch by Matthew Dempsky! llvm-svn: 226641
* Only use -target flag when target_triple is manually specifiedEric Fiselier2015-01-201-3/+5
| | | | llvm-svn: 226615
* Print compiler path during configuration and pass more flags to the linkerEric Fiselier2015-01-202-1/+5
| | | | llvm-svn: 226576
* Address danalbert's post-commit review comments on D7019 and small fixes.Eric Fiselier2015-01-202-10/+12
| | | | | | | | | | | This patch addresses some comments on http://reviews.llvm.org/D7019. - Move compiler.py to test/libcxx from test/libcxx/test. - Make CXXCompiler.target None by default. - Use `{}` instead of `dict()` to initialize an empty dict. - Pass the -fsanitize options to both the compile and link commands. llvm-svn: 226575
* Cleaning up the test suite; remove some includes of non-standard file <__config>Marshall Clow2015-01-1812-35/+8
| | | | llvm-svn: 226411
* A couple small changes to get LIT working with python3Eric Fiselier2015-01-162-2/+2
| | | | llvm-svn: 226330
* [libcxx] Add compiler utility class for LIT testsEric Fiselier2015-01-163-123/+189
| | | | | | | | | | | | | | | | | Summary: This adds a compiler utility class that handles generating compile commands and running them. Instead of having to pass the compiler path and 3 groups of flags between the configuration and the test format this allows us to just pass the compiler object. Reviewers: danalbert, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7019 llvm-svn: 226323
* Add 'no_default_flags' option for turning off all default test compile and ↵Eric Fiselier2015-01-162-14/+30
| | | | | | | | | | | | | | link flags. When 'no_default_flags' is true only flags passed using '--param=compile_flags' and '--param=link_flags' will be used when compiling the tests. This option can be used to run the test suite against libstdc++ and helps with all unusual test suite configurations. NOTE: sanitizer flags are still added when '--param=use_sanitizer' is used even if '--param=no_default_flags' is given. llvm-svn: 226322
* Remove triple detection from cmake.Dan Albert2015-01-162-69/+2
| | | | | | | | This isn't actually used for anything, and is broken on Darwin (currently causing build failures now that the triple is passed to aid cross compiling). Rather than fix unused code, just remove it. llvm-svn: 226243
* [libc++] Add support for cross compiling.Dan Albert2015-01-163-4/+23
| | | | | | | | | | | | Reviewers: EricWF, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6990 llvm-svn: 226237
* Print out environment in lit notesJonathan Roelofs2015-01-151-0/+1
| | | | llvm-svn: 226223
* Use set() instead of option() for string option.Dan Albert2015-01-151-1/+2
| | | | | | Fixes issue in r226185. llvm-svn: 226192
* Add a cmake option for LIT configuration variant.Dan Albert2015-01-152-0/+3
| | | | llvm-svn: 226185
* Refactor configure_link_flags for modularity. NFCJonathan Roelofs2015-01-151-8/+16
| | | | llvm-svn: 226174
* Rename src_root -> libcxx_src_root. NFCJonathan Roelofs2015-01-151-5/+6
| | | | llvm-svn: 226063
* Rename system_lib -> system_cxx_lib. NFCJonathan Roelofs2015-01-1430-82/+82
| | | | llvm-svn: 226061
* Rename library_root to libcxx_library_root. NFCJonathan Roelofs2015-01-141-8/+8
| | | | llvm-svn: 226043
* Refactor configure_compile_flags. NFCJonathan Roelofs2015-01-141-22/+36
| | | | llvm-svn: 226040
* Support picking the unwinder used for testing on linux (just as libc++abi ↵Jonathan Roelofs2015-01-141-2/+12
| | | | | | testing allows) llvm-svn: 226024
* Fix a lit configuration diagnostic. NFCJonathan Roelofs2015-01-141-1/+1
| | | | llvm-svn: 225985
* Refactor the lit config's linker flag discovery code. NFCJonathan Roelofs2015-01-141-4/+14
| | | | llvm-svn: 225920
* Make regex::assign not clobber the regex in case of failure. Fixes PR#22213Marshall Clow2015-01-132-3/+10
| | | | llvm-svn: 225799
* Fix vexing parse in test.Eric Fiselier2015-01-121-1/+1
| | | | llvm-svn: 225633
* One more #include request in the test suite from Walter BrownMarshall Clow2015-01-111-0/+1
| | | | llvm-svn: 225609
* Change a couple more template parameter names from 'T' to '_Tp', etc. Thanks ↵Marshall Clow2015-01-112-10/+10
| | | | | | to Ondřej Majerech for the patch, but I did a bit more. llvm-svn: 225598
* Support Newlib as libc++'s C library [cstdio part, part 2]Jonathan Roelofs2015-01-101-0/+18
| | | | | | | | Wrappers for clearerr, feof, ferror (which newlib implements as macros). http://reviews.llvm.org/D5420 llvm-svn: 225563
* Walter Brown sent a list of tests which needed 'additional includes' to ↵Marshall Clow2015-01-0969-0/+70
| | | | | | match what was in the standard. Added these includes to the tests. No changes to the library or test results. llvm-svn: 225541
* [libc++] Refactor test components into modules.Dan Albert2015-01-096-631/+710
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I've moved the bulk of `lit.cfg` into `test/libcxx/testconfig.py` and `test/libcxx/testformat.py`. All that remains in `lit.cfg` is the logic to discover lit.site.cfg if lit.cfg was run directly, and the logic for loading configuration variants. The configuration variant flow has changed with this patch. Rather than instantiating an object of type `<VARIANT>Configuration`, we now instatiate an object of type `Configuration` that was loaded from the module `<VARIANT>.testconfig.py`. This has to be done on a per-project basis rather than in LIT itself because LIT doesn't actually know where the real test directory is, only where the site configuration is (which is usually in the output directory). It's simple enough to do though, so it's fine to require each project to do it themselves. I also cleaned up all the pylint issues while I was here, which was mostly just a matter of fixing long lines. Reviewers: mclow.lists, jroelofs, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6881 llvm-svn: 225532
* K-Ballo found a place where we were using 'V' as a template parameter. ↵Marshall Clow2015-01-091-2/+2
| | | | | | Replace with '_Vp' for protection against user-defined macros. llvm-svn: 225527
* In early C++11 standard drafts, std::function derived from ↵Marshall Clow2015-01-081-29/+88
| | | | | | std::unary_function or std::binary_function if there was only one (or two) parameters. Before C++11 shipped, this restiction was lifted, but libc++ still does this (which is fine). However, the tests still check for this outdated requiremnt. Change then to check for the nested typedefs instead (which are still required by the standard). No change to the library. llvm-svn: 225430
* Add checks to make sure the hash functor has the right typedefsMarshall Clow2015-01-081-0/+4
| | | | llvm-svn: 225429
* Missed a typenameMarshall Clow2015-01-071-2/+2
| | | | llvm-svn: 225408
* libc++ implements its' hash objects as deriving from std::unary_function, ↵Marshall Clow2015-01-0711-24/+35
| | | | | | and the tests test for that. STL @ MS pointed out that the standard doesn't requie these objects to derive from unary_function, and so the tests should not require that either. Change the tests to check for the embedded typedefs - which ARE required. No change to the library. llvm-svn: 225403
* In C++03, a bunch of the arithmetic/logical/comparison functors (such as ↵Marshall Clow2015-01-074-4/+8
| | | | | | negate/bit_not.pass/logical_not) were defined as deriving from unary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion. llvm-svn: 225402
* Add tests to check the typedefs from the result of std::owner_lessMarshall Clow2015-01-071-0/+8
| | | | llvm-svn: 225381
* Missed one comparison test in r225375Marshall Clow2015-01-071-1/+3
| | | | llvm-svn: 225376
* In C++03, a bunch of the arithmetic/logical/comparison functors (such as ↵Marshall Clow2015-01-0716-16/+48
| | | | | | add/equal_to/logical_or) were defined as deriving from binary_funtion. That restriction was removed in C++11, but the tests still check for this. Change the test to look for the embedded types first_argument/second_argument/result_type. No change to the library, just more standards-compliant tests. Thanks to STL @ Microsoft for the suggestion. llvm-svn: 225375
* Move a test to the new tests directory.Dan Albert2015-01-061-0/+0
| | | | | | | I had written the patch that added this test before the tests were moved into tests/std, so the test ended up in the wrong directory. llvm-svn: 225300
* Make a test UNSUPPORTED if libcpp-has-no-threads.Dan Albert2015-01-061-0/+2
| | | | llvm-svn: 225287
* Appease MSAN buildbots.Dan Albert2015-01-061-1/+1
| | | | | | | This is just a compile time test, but we have MSAN buildbots that will fail since `exp` was uninitialized. llvm-svn: 225286
* Fix PR 22106; make std::swap work for multi-dimensional arrays. Thanks to ↵Marshall Clow2015-01-062-0/+53
| | | | | | Peter Griess for the report and suggested fix llvm-svn: 225285
* Obey [atomics.types.operations.req]/21 for GCC.Dan Albert2015-01-062-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Excerpt from [atomics.types.operations.req]/21: > When only one memory_order argument is supplied, the value of > success is order, and the value of failure is order except that a > value of memory_order_acq_rel shall be replaced by the value > memory_order_acquire and a value of memory_order_release shall be > replaced by the value memory_order_relaxed. Clean up some copy pasta while I'm here (someone added a return statement to a void function). Reviewers: EricWF, jroelofs, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6632 llvm-svn: 225280
* [libcxx] Set _LIBCPP_ELAST for mingw.Dan Albert2015-01-064-23/+50
| | | | | | | | | | | | Reviewers: K-ballo, mclow.lists, EricWF Reviewed By: EricWF Subscribers: jfb, jroelofs, majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D6558 llvm-svn: 225273
* [cmake/multilib] Teach libc++'s CMake build to support multilib libdirChandler Carruth2014-12-292-4/+11
| | | | | | | | | | | | | | | | | | suffixes like 'lib64' or 'lib32'. This support is currently very rhudimentary. We define a variable LIBCXX_LIBDIR_SUFFIX. In a standalone build of libc++ this can be directly set as a cached variable to control the multilib suffix used. When building libc++ within a larger LLVM build, it is hard wired to whatever LLVM libdir suffix has been selected. If this doesn't work for someone, just let me know. I'm happy to change it. This is essentially new functionality for libc++ so I don't expect it to have any impact for folks until they start setting these variables. However, I know libc++ is built in a diverse set of environments so just let me know if this causes you any problems. llvm-svn: 224926
* Prevent ill-formed instantiation of __invoke_of<...> during the evaluation ↵Eric Fiselier2014-12-232-2/+51
| | | | | | | | | | | | | | | | of a bind expression. Fixes PR22003. The SFINAE on the function __mu(Fn, Args...) that evaluates nested bind expressions always tries to deduce the return type for Fn(Args...) even when Fn is not a nested bind expression. This can cause hard compile errors when the instantation of Fn(Args...) is ill-formed. This patch prevents the instantation of __invoke_of<Fn, Args...> unless Fn is actually a bind expression. Bug reportand patch from Michel Morin. http://llvm.org/bugs/show_bug.cgi?id=22003 llvm-svn: 224753
* Remove non-const test to get test passing. Will come back later and ↵Marshall Clow2014-12-231-4/+0
| | | | | | (correctly) add non-const tests llvm-svn: 224748
* [libcxx] Consolidate new/delete replacement in tests and disable it when ↵Eric Fiselier2014-12-2219-449/+372
| | | | | | | | | | | | | | | | | | | | using sanitizers. Summary: MSAN and ASAN also replace new/delete which leads to a link error in these tests. Currently they are unsupported but I think it would be useful if these tests could run with sanitizers. This patch creates a support header that consolidates the new/delete replacement functionality and checking. When we are using sanitizers new and delete are no longer replaced and the checks always return true. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6562 llvm-svn: 224741
* [libcxx] Add numerous options to libc++ LIT test suite configuration. Eric Fiselier2014-12-224-51/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to fully replace the testit script we need to update LIT so it provides the same functionality. This patch adds a number of different configuration options to LIT to do that. It also adds documentation for all of the command line parameters that LIT supports. Generic options added: - `libcxx_headers` - `libcxx_library` - `compile_flags` Generic options modified: - `link_flags`: Changed from overriding the default args to adding extra args instead (to match compile flags) - `use_sanitizer`: Renamed from `llvm_use_sanitizer` Please see the added documentation for more information about the switches. As for the actual documentation I'm not sure if it should be kept in libc++ forever since it adds an undue maintenance burden, but I think it should be added for the time being while the changes are new. I'm verify unskilled with HTML so if the documentation needs any changes please let me know. Hopefully this will kill testit. Reviewers: jroelofs, mclow.lists, danalbert Reviewed By: danalbert Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D5877 llvm-svn: 224728
* Fix PR22000. __bit_iterator::move_backwards. Also make a note that ↵Marshall Clow2014-12-221-1/+1
| | | | | | | | __bit_iterator is quite underrepresented in the libc++ tests suite. llvm-svn: 224723
* Move unconditional test compile and link flags into their configuration ↵Eric Fiselier2014-12-201-2/+4
| | | | | | functions. llvm-svn: 224674
OpenPOWER on IntegriCloud