summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Path.inc
Commit message (Collapse)AuthorAgeFilesLines
...
* On Windows, autolink advapi32 from Path.inc for CryptAcquireContextWReid Kleckner2013-08-071-0/+4
| | | | | | | | | | | This allows llvm-tblgen to link successfully when compiling with clang. Both MSBuild and CMake will automatically add advapi32 as part of a set of other dlls comprising the win32 API to the link line, but CMake doesn't do that when compiling with clang. Until someone adds that info to cmake upstream, this seems like a reasonable work around. llvm-svn: 187907
* Fix windows' implementation of status when a file doesn't exist.Rafael Espindola2013-07-311-6/+11
| | | | | | | | | The unix one was returning no_such_file_or_directory, but the windows one was return success. Update the one one caller that was depending on the old behavior. llvm-svn: 187463
* 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
* 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
* 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-0/+1092
| | | | 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
* 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
* 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
* 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 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
* Remove Path::getMagicNumber.Rafael Espindola2013-06-121-25/+0
| | | | llvm-svn: 183839
* Remove Path::isAbsolute.Rafael Espindola2013-06-121-18/+0
| | | | llvm-svn: 183836
* Remove Path::isAbsolute().Rafael Espindola2013-06-121-15/+0
| | | | llvm-svn: 183835
* Remove Path::getSuffix.Rafael Espindola2013-06-121-16/+0
| | | | llvm-svn: 183833
* Remove sys::CopyFile.Rafael Espindola2013-06-121-11/+0
| | | | llvm-svn: 183831
* Remove the old file memory mapping functions.Rafael Espindola2013-06-121-11/+0
| | | | llvm-svn: 183828
* Remove Path::createFileOnDisk.Rafael Espindola2013-06-121-12/+0
| | | | llvm-svn: 183827
* Remove Path::makeExecutableOnDisk.Rafael Espindola2013-06-121-5/+0
| | | | llvm-svn: 183826
* Remove Path::getDirname.Rafael Espindola2013-06-111-5/+0
| | | | llvm-svn: 183780
* Remove Path::getBasename.Rafael Espindola2013-06-111-16/+0
| | | | llvm-svn: 183779
* Remove Path::getLast.Rafael Espindola2013-06-111-17/+0
| | | | llvm-svn: 183778
* Remove GetRootDirectory.Rafael Espindola2013-06-111-8/+0
| | | | llvm-svn: 183775
* Remove GetUserHomeDirectory.Rafael Espindola2013-06-111-13/+0
| | | | llvm-svn: 183773
* Remove GetSystemLibraryPaths.Rafael Espindola2013-06-111-30/+0
| | | | llvm-svn: 183770
* Remove Path::GetBitcodeLibraryPaths.Rafael Espindola2013-06-111-17/+0
| | | | llvm-svn: 183765
OpenPOWER on IntegriCloud