summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/FileOutputBufferTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* Fix a real temp file leak in FileOutputBufferReid Kleckner2016-09-021-5/+8
| | | | | | | | | | | | | If we failed to commit the buffer but did not die to a signal, the temp file would remain on disk on Windows. Having an open file mapping and file handle prevents the file from being deleted. I am choosing not to add an assertion of success on the temp file removal, since virus scanners and other environmental things can often cause removal to fail in real world tools. Also fix more temp file leaks in unit tests. llvm-svn: 280445
* Return ErrorOr from FileOutputBuffer::create. NFC.Rafael Espindola2015-08-131-9/+16
| | | | llvm-svn: 244848
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Remove unused feature. NFC.Rafael Espindola2014-12-121-3/+2
| | | | llvm-svn: 224135
* Misc cleanups to the FileSytem api.Rafael Espindola2014-09-111-3/+3
| | | | | | | | | | | | | | | | 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 the last uses of 'using std::error_code'Rafael Espindola2014-06-131-7/+7
| | | | | | This finishes the transition to std::error_code. llvm-svn: 210877
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove unused has_magic.Rafael Espindola2014-06-111-10/+2
| | | | | | | 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 std::unique_ptr instead of OwningPtr in the MemoryBuffer unittests.Craig Topper2014-05-181-5/+4
| | | | llvm-svn: 209102
* Fix known typosAlp Toker2014-01-241-1/+1
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
* Remove remove_all. A compiler has no need for recursively deleting a directory.Rafael Espindola2014-01-101-2/+5
| | | | llvm-svn: 198955
* Add a convenience createUniqueDirectory function.Rafael Espindola2013-06-271-5/+1
| | | | | | | | | | | There are a few valid situation where we care about the structure inside a directory, but not about the directory itself. A simple example is for unit testing directory traversal. PathV1 had a function like this, add one to V2 and port existing users of the created temp file and delete it hack to using it. llvm-svn: 185059
* Move PathV2.h to Path.hRafael Espindola2013-06-111-1/+1
| | | | | | | Most clients have already been moved from Path V1 to V2. The ones using V1 now include PathV1.h explicitly. llvm-svn: 183801
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-2/+0
| | | | llvm-svn: 169250
* [Support] Make FileOutputBuffer work on Windows.Michael J. Spencer2012-12-031-18/+7
| | | | llvm-svn: 169167
* Initial commit of new FileOutputBuffer support class. Nick Kledzik2012-08-011-0/+137
Since the llvm::sys::fs::map_file_pages() support function it relies on is not yet implemented on Windows, the unit tests for FileOutputBuffer are currently conditionalized to run only on unix. llvm-svn: 161099
OpenPOWER on IntegriCloud