summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/FileSystem.h
Commit message (Collapse)AuthorAgeFilesLines
* Add disk_space() to llvm::fsMehdi Amini2016-04-011-0/+12
| | | | | | | | | | Summary: Adapted from Boost::filesystem. (This is a reapply by reverting commit r265080 and fixing the WinAPI part) Differential Revision: http://reviews.llvm.org/D18467 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265082
* Revert "Add disk_space() to llvm::fs"Mehdi Amini2016-04-011-12/+0
| | | | | | | | This reverts commit r265074 and r265068. Breaks windows build From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265080
* Use const ref instead of value for Twine in the disk_space() APIMehdi Amini2016-03-311-1/+1
| | | | | | | Thanks Rui for noticing! From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265074
* Add disk_space() to llvm::fsMehdi Amini2016-03-311-0/+12
| | | | | | | | | | Summary: Adapted from Boost::filesystem. (This is a reapply by reverting commit r265062 and fixing the WinAPI part) Differential Revision: http://reviews.llvm.org/D18467 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265068
* Revert "Add disk_space() to llvm::fs"Mehdi Amini2016-03-311-11/+0
| | | | | | | | | Breaks windows bot. This reverts commit r265050. This reverts commit r265055. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265062
* Wdocumentation parameter fixSimon Pilgrim2016-03-311-2/+0
| | | | llvm-svn: 265055
* Add disk_space() to llvm::fsMehdi Amini2016-03-311-0/+13
| | | | | | | | | | | | | Summary: Adapted from Boost::filesystem. Reviewers: bruno, silvas Subscribers: tberghammer, danalbert, llvm-commits, srhines Differential Revision: http://reviews.llvm.org/D18467 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265050
* Fix windows build for sys::fs:file_status Access Time added in r264392Mehdi Amini2016-03-251-2/+3
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264393
* Add lastAccessedTime to file_statusMehdi Amini2016-03-251-22/+32
| | | | | | | | | Differential Revision: http://reviews.llvm.org/D18456 This is a re-commit of r264387 and r264388 after fixing a typo. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264392
* Revert "Add lastAccessedTime to file_status"Mehdi Amini2016-03-251-32/+22
| | | | | | | | This reverts commit r264387. Bots are broken in various ways, I need to take one commit at a time... From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264390
* Add lastAccessedTime to file_statusMehdi Amini2016-03-251-22/+32
| | | | | | | | | | | Reviewers: silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18456 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 264387
* NFC: Update documentation for createUniqueFile() to explain that models ↵Cameron Esfahani2015-11-061-3/+3
| | | | | | without an absolute path will be created in the current directory. llvm-svn: 252265
* Revert r250923 as config.h is not an installed header.Yaron Keren2015-10-211-1/+0
| | | | llvm-svn: 250924
* Include llvm/Config/config.h in FileSystem.h as it depends upon ↵Yaron Keren2015-10-211-0/+1
| | | | | | HAVE_SYS_STAT_H which is defined (or not) in config.h. llvm-svn: 250923
* [Support] Add a version of fs::make_absolute with a custom CWD.Benjamin Kramer2015-10-051-0/+14
| | | | | | This will be used soon from clang. llvm-svn: 249309
* ScanDirForExecutable on Windows fails to find executables with the "exe" ↵Reid Kleckner2015-09-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | extension in name When the driver tries to locate a program by its name, e.g. a linker, it scans the paths provided by the toolchain using the ScanDirForExecutable function. If the lookup fails, the driver uses llvm::sys::findProgramByName. Unlike llvm::sys::findProgramByName, ScanDirForExecutable is not aware of file extensions. If the program has the "exe" extension in its name, which is very common on Windows, ScanDirForExecutable won't find it under the toolchain-provided paths. This patch changes the Windows version of the "`can_execute`" function called by ScanDirForExecutable to respect file extensions, similarly to llvm::sys::findProgramByName. Patch by Oleg Ranevskyy Reviewers: rnk Differential Revision: http://reviews.llvm.org/D12711 llvm-svn: 247358
* Reformat headers in ADT and Support partially.NAKAMURA Takumi2015-08-101-6/+6
| | | | | | Note, I didn't reformat entirely, but partially where I touched in previous commits. llvm-svn: 244432
* Whitespace.NAKAMURA Takumi2015-08-101-6/+6
| | | | llvm-svn: 244431
* Reformat linebreaks.NAKAMURA Takumi2015-08-101-0/+1
| | | | llvm-svn: 244430
* Thread premissions through sys::fs::create_director{y|ies}Frederic Riss2015-08-061-2/+4
| | | | llvm-svn: 244268
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-2/+2
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-2/+2
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Mark empty default constructors as =default if it makes the type PODBenjamin Kramer2015-04-111-1/+1
| | | | | | NFC llvm-svn: 234694
* Object: Handle Mach-O kext bundle filesJustin Bogner2015-02-251-0/+1
| | | | | | This particular subtype of Mach-O was missing. Add it. llvm-svn: 230567
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-3/+3
| | | | | | requiring the macro. NFC; LLVM edition. llvm-svn: 229340
* Remove the last unnecessary member variable of mapped_file_region. NFC.Rafael Espindola2014-12-161-3/+0
| | | | llvm-svn: 224312
* Convert a member variable to a local variable. NFC.Rafael Espindola2014-12-161-1/+0
| | | | llvm-svn: 224311
* Remove unused member and simplify. NFC.Rafael Espindola2014-12-161-1/+0
| | | | llvm-svn: 224309
* Fix Doxygen command misspellings.Benjamin Kramer2014-12-131-2/+2
| | | | | | Found by -Wdocumentation. llvm-svn: 224197
* Pass a FD to resise_file and add a testcase.Rafael Espindola2014-12-121-2/+2
| | | | | | I will add a real use in another commit. llvm-svn: 224136
* Remove a convoluted way of calling close by moving the call to the only caller.Rafael Espindola2014-12-111-9/+3
| | | | | | As a bonus we can actually check the return value. llvm-svn: 224046
* Remove dead code. NFC.Rafael Espindola2014-12-111-18/+0
| | | | llvm-svn: 224029
* Support ELF files of unknown type.Michael J. Spencer2014-11-181-0/+1
| | | | llvm-svn: 222208
* Move sys::fs::AccessMode out of @brief in the function. [-Wdocumentation]NAKAMURA Takumi2014-09-121-1/+2
| | | | | FIXME: Annotate sys::fs::AccessMode. llvm-svn: 217685
* sys::fs::access(): Fix @param [-Wdocumentation]NAKAMURA Takumi2014-09-121-1/+1
| | | | llvm-svn: 217684
* Misc cleanups to the FileSytem api.Rafael Espindola2014-09-111-12/+16
| | | | | | | | | | | | | | | | The main difference is the removal of std::error_code exists(const Twine &path, bool &result); It was an horribly redundant interface since a file not existing is also a valid error_code. Now we have an access function that returns just an error_code. This is the only function that has to be implemented for Unix and Windows. The functions can_write, exists and can_execute an now just wrappers. One still has to be very careful using these function to avoid introducing race conditions (Time of check to time of use). llvm-svn: 217625
* Remove dead code. Fixes pr20544.Rafael Espindola2014-08-081-8/+0
| | | | llvm-svn: 215243
* Fix 'platform-specific' hyphenationsAlp Toker2014-06-301-17/+17
| | | | llvm-svn: 212056
* Build fix for systems without futimes/futimensAlp Toker2014-06-301-2/+2
| | | | | | | | | Some versions of Android don't have futimes/futimens and this code wasn't updated during the recent errc refactoring. Patch by Luqman Aden! llvm-svn: 212055
* Support: Add llvm::sys::fs::copy_fileJustin Bogner2014-06-191-0/+6
| | | | | | A function to copy one file's contents to another. llvm-svn: 211302
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-62/+55
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove system_error.h.Rafael Espindola2014-06-121-1/+2
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* Implement get_magic with generic tools and inline it.Rafael Espindola2014-06-111-13/+0
| | | | llvm-svn: 210716
* Remove unused has_magic.Rafael Espindola2014-06-111-8/+0
| | | | | | | This will allow inlining get_magic, which should in turn fix one of the mingw build problems after the switch to std::error_code. llvm-svn: 210712
* Use an enum class now that they are available.Rafael Espindola2014-06-101-20/+12
| | | | llvm-svn: 210566
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-1/+1
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209952
* delete dead code.Rafael Espindola2014-05-311-24/+0
| | | | llvm-svn: 209938
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-291-1/+1
| | | | | | necessary. llvm-svn: 207593
* [Windows] Fix assertion failure when passing 'nul' in input to clang.Andrea Di Biagio2014-04-291-3/+18
| | | | | | | | | | | | | | | | | Before this patch, if 'nul' was passed in input to clang, function getStatus() (in Path.inc) always returned an instance of file_status with field 'nFileSizeHigh' and 'nFileSizeLow' left uninitialized. This was causing the triggering of an assertion failure in MemoryBuffer.cpp due to an invalid FileSize for device 'nul'. This patch fixes the assertion failure modifying the constructors of class file_status (in llvm/Support/FileSystem.h) so that every field of the class gets initialized to zero by default. A clang test will be submitted on a separate patch. llvm-svn: 207575
* [C++11] Replace some comparisons with 'nullptr' with simple boolean checks ↵Craig Topper2014-04-091-2/+2
| | | | | | to reduce verbosity. llvm-svn: 205829
OpenPOWER on IntegriCloud