summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
Commit message (Collapse)AuthorAgeFilesLines
* Implement getUniqueID for directories on windows.Rafael Espindola2013-07-301-18/+14
| | | | llvm-svn: 187441
* Remove dead code.Rafael Espindola2013-07-301-3/+0
| | | | llvm-svn: 187439
* Make file_status::getUniqueID const.Rafael Espindola2013-07-291-1/+1
| | | | llvm-svn: 187383
* Include st_dev to make the result of getUniqueID actually unique.Rafael Espindola2013-07-291-19/+8
| | | | | | This will let us use getUniqueID instead of st_dev directly on clang. llvm-svn: 187378
* Improve our error handling on windows.Rafael Espindola2013-07-261-38/+1
| | | | | | | | | | | | | | * Remove LLVM_ENABLE_CRT_REPORT. LLVM_DISABLE_CRASH_REPORT made it redundant. * set Return to 1, so that we get a stack trace on failure. * don't call _exit, so that we get a negative exit value and "not --crash" correctly differentiates crashes and regular errors. This is a bit experimental since the documentation on this interface is sparse. It doesn't bring up a dialog on my windows setup, but feel free to revert if it causes problem for your setup (and let me know what it is so that I can try to fix this patch). llvm-svn: 187206
* Initialize TempFileHandle.Serge Pavlov2013-07-191-1/+1
| | | | llvm-svn: 186684
* Split openFileForWrite into windows and unix versions.Rafael Espindola2013-07-191-0/+54
| | | | | | It is similar to 186511, but for creating files for writing. llvm-svn: 186679
* Small improvement to the use of GetFileType:Rafael Espindola2013-07-181-1/+8
| | | | | | | | | * assert that the return value is one of the documented values on msdn. * on FILE_TYPE_UNKNOWN, check GetLastError. Unfortunately I can't think of a way to get a FILE_TYPE_UNKNOWN on a test. llvm-svn: 186595
* Windows/Path.inc: Introduce file_type::character_file and ↵NAKAMURA Takumi2013-07-181-0/+13
| | | | | | | | | file_type::fifo_file in sys::fs::getStatus(HANDLE). It fixes llvm/test/Other/close-stderr.ll on msys. FIXME: Provide unittests. llvm-svn: 186588
* Remove dead code.Rafael Espindola2013-07-181-23/+0
| | | | llvm-svn: 186561
* Fix a funny typo. Thanks to Aaron Ballman for noticing.Rafael Espindola2013-07-171-1/+1
| | | | llvm-svn: 186532
* Add FILE_SHARE_WRITE to openFileForRead.Rafael Espindola2013-07-171-1/+1
| | | | | | | | | | | | | | This should fix the windows bots. It looks like the failing tests are of the form prog1 > file prog2 file and prog2 fails trying to read the file. The best fix would probably be to close stdout/stderr in prog1, but it was not the intention of 186511 to change this, so just restore the old behavior for now. llvm-svn: 186530
* Split openFileForRead into Windows and Unix versions.Rafael Espindola2013-07-171-0/+31
| | | | | | | | | | | This has some advantages: * Lets us use native, utf16 windows functions. * Easy to produce good errors on windows about trying to use a directory when we want a file. * Simplifies the unix version a bit. llvm-svn: 186511
* [Support] Fix some warnings when self-hosting clang on WindowsReid Kleckner2013-07-161-2/+0
| | | | llvm-svn: 186413
* Add a version of sys::fs::status that uses fstat.Rafael Espindola2013-07-161-22/+38
| | | | llvm-svn: 186378
* Instead friending status, provide windows and posix constructors to file_status.Rafael Espindola2013-07-161-9/+6
| | | | | | | This opens the way of having static helpers in the .inc files that can construct a file_status. llvm-svn: 186376
* Add include to hopefully fix windows build.Craig Topper2013-07-151-0/+1
| | | | llvm-svn: 186310
* Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).Craig Topper2013-07-151-1/+1
| | | | llvm-svn: 186301
* Windows/TimeValue.inc: Mute prefixed '0' on %d to emulate %e.NAKAMURA Takumi2013-07-121-0/+5
| | | | | | It fixes compatibility in llvm/test/Object/archive-toc.test. llvm-svn: 186142
* Add back code for supporting old mingw versions. Should bring the bots back.Rafael Espindola2013-07-111-3/+13
| | | | llvm-svn: 186096
* Looks like some versions of mingw don't have errno_t. Use int.Rafael Espindola2013-07-111-1/+1
| | | | llvm-svn: 186092
* Fix a FIXME about the format and add a test.Rafael Espindola2013-07-111-14/+9
| | | | | | | While at it, use strftime on Unix too and use the thread safe versions of localtime. llvm-svn: 186090
* Use status to implement file_size.Rafael Espindola2013-07-101-21/+0
| | | | | | | | | | The status function is already using a syscall that returns the file size. Remember it and implement file_size as a simple wrapper. No functionally change, but clients that already use status now can avoid calling file_size. llvm-svn: 186016
* We now always create files with the correct permissions. Simplify the interface.Rafael Espindola2013-07-081-34/+0
| | | | llvm-svn: 185834
* Improvements to unique_file and createUniqueDirectory.Rafael Espindola2013-06-281-135/+134
| | | | | | | | | | | | | | | | | | | * Don't try to create parent directories in unique_file. It had two problem: * It violates the contract that it is atomic. If the directory creation success and the file creation fails, we would return an error but the file system was modified. * When creating a temporary file clang would have to first check if the parent directory existed or not to avoid creating one when it was not supposed to. * More efficient implementations of createUniqueDirectory and the unique_file that produces only the file name. Now all 3 just call into a static function passing what they want (name, file or directory). Clang also has to be updated, so tests might fail if a bot picks up this commit and not the corresponding clang one. llvm-svn: 185126
* Rename PathV2 to just Path now that it is the only one.Rafael Espindola2013-06-261-2/+2
| | | | llvm-svn: 185015
* PathV1 is deprecated since the 18th of Dec 2010. Remove it.Rafael Espindola2013-06-261-587/+0
| | | | llvm-svn: 184960
* Remove sys::GetMainExecutable.Rafael Espindola2013-06-261-9/+0
| | | | llvm-svn: 184916
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-261-0/+7
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. llvm-svn: 184914
* Remove PathWithStatus.Rafael Espindola2013-06-261-29/+0
| | | | llvm-svn: 184910
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-251-4/+0
| | | | llvm-svn: 184853
* Remove sys::PathSeparator.Rafael Espindola2013-06-251-2/+0
| | | | llvm-svn: 184852
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-201-1/+1
| | | | llvm-svn: 184478
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-201-0/+11
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. llvm-svn: 184464
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-201-0/+10
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. llvm-svn: 184450
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-201-1/+1
| | | | llvm-svn: 184431
* Modified the implementation of fs::GetUniqueID on Windows such that it ↵Aaron Ballman2013-06-191-9/+14
| | | | | | actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID. llvm-svn: 184351
* Remove Path::getDirectoryContents.Rafael Espindola2013-06-191-48/+0
| | | | llvm-svn: 184311
* Remove Path::canExecute.Rafael Espindola2013-06-191-7/+0
| | | | llvm-svn: 184298
* Remove Path::canWrite.Rafael Espindola2013-06-181-7/+0
| | | | llvm-svn: 184235
* Add a can_write function to PathV2.Rafael Espindola2013-06-181-0/+12
| | | | llvm-svn: 184233
* Remove unused Path::canRead.Rafael Espindola2013-06-181-7/+0
| | | | llvm-svn: 184229
* Remove uniqueID from PathV1.h.Rafael Espindola2013-06-181-7/+0
| | | | llvm-svn: 184219
* Add a GetUniqueID that will replace the uniqueID of PathV1.h.Rafael Espindola2013-06-181-0/+14
| | | | llvm-svn: 184217
* Add GetCurrentDirectory back.Rafael Espindola2013-06-141-0/+10
| | | | | | | | It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp depends on the behaviour of the old one on Windows. Maybe a difference between GetCurrentDirectoryA and GetCurrentDirectoryW? llvm-svn: 184009
* Replace use of PathV1.h in MCContext.cpp.Rafael Espindola2013-06-141-10/+0
| | | | | | GetCurrentDirectory is now unused. Remove it. llvm-svn: 184003
* Replace use of PathV1.h in Program.cpp.Rafael Espindola2013-06-142-16/+27
| | | | llvm-svn: 183996
* Remove unused argument.Rafael Espindola2013-06-141-3/+3
| | | | llvm-svn: 183992
* Remove a use of sys::Path.Rafael Espindola2013-06-141-2/+3
| | | | llvm-svn: 183979
* Try to fix the windows build.Rafael Espindola2013-06-131-1/+1
| | | | llvm-svn: 183950
OpenPOWER on IntegriCloud