[libcxx] [test] Fix path.modifiers remove_filename and replace_filename for windowsAlso fix the synopsis in the replace_filename test, while touchingthat file.Differential Revision: https://revi
[libcxx] [test] Fix path.modifiers remove_filename and replace_filename for windowsAlso fix the synopsis in the replace_filename test, while touchingthat file.Differential Revision: https://reviews.llvm.org/D98108
show more ...
[libc++] Remove uses of verbose_assert.h in Filesystem testsFor a modest loss of debugability in the tests, this allows more teststo run on platforms that do not have support for <iostream>.
[libcxx] [test] Fix path.modifiers/make_preferred for windowsUse p.string() instead of p.native() for comparing with the expectedvalue.Explicitly list the expected values for both posix and wind
[libcxx] [test] Fix path.modifiers/make_preferred for windowsUse p.string() instead of p.native() for comparing with the expectedvalue.Explicitly list the expected values for both posix and windos, even ifthe operation is an identity operation on posix.Differential Revision: https://reviews.llvm.org/D89532
[libc++] Remove signal-based checkpoints in libc++ testsWhile this adds some convenience to the test suite, it prevents the testsusing these checkpoints from being used on systems where signals ar
[libc++] Remove signal-based checkpoints in libc++ testsWhile this adds some convenience to the test suite, it prevents the testsusing these checkpoints from being used on systems where signals are notavailable, such as some embedded systems. It will also prevent these testsfrom being constexpr-friendly once e.g. std::map is made constexpr, dueto the use of statics.Instead, one can always use a debugger to figure out exactly where atest is failing when that isn't clear from the log output withoutcheckpoints.
[libc++] Remove the c++98 Lit feature from the test suiteC++98 and C++03 are effectively aliases as far as Clang is concerned.As such, allowing both std=c++98 and std=c++03 as Lit parameters isju
[libc++] Remove the c++98 Lit feature from the test suiteC++98 and C++03 are effectively aliases as far as Clang is concerned.As such, allowing both std=c++98 and std=c++03 as Lit parameters isjust slightly confusing, but provides no value. It's similar to allowingboth std=c++17 and std=c++1z, which we don't do.This was discovered because we had an internal bot that ran the testsuite under both c++98 AND c++03 -- one of which is redundant.Differential Revision: https://reviews.llvm.org/D80926
libcxx: Rename .hpp files in libcxx/test/support to .hLLVM uses .h as its extension for header files.Files renamed using: for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; done
libcxx: Rename .hpp files in libcxx/test/support to .hLLVM uses .h as its extension for header files.Files renamed using: for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; doneReferences to the files updated using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do a=$(basename $f); echo $a; rg -l $a libcxx | xargs sed -i '' "s/$a/${a%.hpp}.h/"; doneHPP include guards updated manually using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do echo ${f%.hpp}.h ; done | xargs mvimDifferential Revision: https://reviews.llvm.org/D66104llvm-svn: 369481
Revert "[libc++] Build <filesystem> support as part of the dylib"When I applied r356500 (https://reviews.llvm.org/D59152), I somehowdeleted all of filesystem's tests. I will revert r356500 and re-
Revert "[libc++] Build <filesystem> support as part of the dylib"When I applied r356500 (https://reviews.llvm.org/D59152), I somehowdeleted all of filesystem's tests. I will revert r356500 and re-applyit properly.llvm-svn: 356505
[libc++] Build <filesystem> support as part of the dylibSummary:This patch treats <filesystem> as a first-class citizen of the dylib,like all other sub-libraries (e.g. <chrono>). As such, it also
[libc++] Build <filesystem> support as part of the dylibSummary:This patch treats <filesystem> as a first-class citizen of the dylib,like all other sub-libraries (e.g. <chrono>). As such, it also removesall special handling for installing the filesystem library separatelyor disabling part of the test suite from the lit command line.Reviewers: mclow.lists, EricWF, serge-sans-pailleSubscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D59152llvm-svn: 356500
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I
Support tests in freestandingSummary:Freestanding is *weird*. The standard allows it to differ in a bunch of oddmanners from regular C++, and the committee would like to improve thatsituation. I'd like to make libc++ behave better with what freestanding shouldbe, so that it can be a tool we use in improving the standard. To do that weneed to try stuff out, both with "freestanding the language mode" and"freestanding the library subset".Let's start with the super basic: run the libc++ tests in freestanding, usingclang as the compiler, and see what works. The easiest hack to do this:In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding']Run the tests and they all fail.Why? Because in freestanding `main` isn't special. This "not special" propertyhas two effects: main doesn't get mangled, and main isn't allowed to omit its`return` statement. The first means main gets mangled and the linker can'tcreate a valid executable for us to test. The second means we spew out warnings(ew) and the compiler doesn't insert the `return` we omitted, and main justfalls of the end and does whatever undefined behavior (if you're luck, ud2leading to non-zero return code).Let's start my work with the basics. This patch changes all libc++ tests todeclare `main` as `int main(int, char**` so it mangles consistently (enabling usto declare another `extern "C"` main for freestanding which calls the mangledone), and adds `return 0;` to all places where it was missing. This touches 6124files, and I apologize.The former was done with The Magic Of Sed.The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feedThis works for most tests, though I did have to adjust a few places when e.g.the test runs with `-x c`, macros are used for main (such as for the filesystemtests), etc.Once this is in we can create a freestanding bot which will prevent furtherregressions. After that, we can start the real work of supporting C++freestanding fairly well in libc++.<rdar://problem/47754795>Reviewers: ldionne, mclow.lists, EricWFSubscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D57624llvm-svn: 353086
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that
Update more file headers across all of the LLVM projects in the monorepoto reflect the new license. These used slightly different spellings thatdefeated my regular expressions.We understand that people may be surprised that we're moving the headerentirely to discuss the new license. We checked this carefully with theFoundation's lawyer and we believe this is the correct approach.Essentially, all code in the project is now made available by the LLVMproject under our new license, so you will see that the license headersinclude that license only. Some of our contributors have contributedcode under our old license, and accordingly, we have retained a copy ofour old license notice in the top-level files in each project andrepository.llvm-svn: 351648
Implement <filesystem>This patch implements the <filesystem> header and uses thatto provide <experimental/filesystem>.Unlike other standard headers, the symbols needed for <filesystem>have not
Implement <filesystem>This patch implements the <filesystem> header and uses thatto provide <experimental/filesystem>.Unlike other standard headers, the symbols needed for <filesystem>have not yet been placed in libc++.so. Instead they live in thenew libc++fs.a library. Users of filesystem are required to link thislibrary. (Also note that libc++experimental no longer contains thedefinition of <experimental/filesystem>, which now requires linking libc++fs).The reason for keeping <filesystem> out of the dylib for now is thatit's still somewhat experimental, and the possibility of requiring anABI breaking change is very real. In the future the symbols will likelybe moved into the dylib, or the dylib will be made to link libc++fs automagically).Note that moving the symbols out of libc++experimental may break user buildsuntil they update to -lc++fs. This should be OK, because the experimentallibrary provides no stability guarantees. However, I plan on looking intoways we can force libc++experimental to automagically link libc++fs.In order to use a single implementation and set of tests for <filesystem>, ithas been placed in a special `__fs` namespace. This namespace is inline inC++17 onward, but not before that. As such implementation is availablein C++11 onward, but no filesystem namespace is present "directly", andas such name conflicts shouldn't occur in C++11 or C++14.llvm-svn: 338093