summaryrefslogtreecommitdiff
path: root/lib/Support/Unix
Commit message (Collapse)AuthorAge
...
* Remove calls to Path in #ifdefs that don't seem to be used in any of the ↵Rafael Espindola2013-06-26
| | | | | | bots :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184920 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build when __APPLE__ is defined.Rafael Espindola2013-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184917 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove sys::GetMainExecutable.Rafael Espindola2013-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184916 91177308-0d34-0410-b5e6-96231b3b80d8
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-26
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184914 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PathWithStatus.Rafael Espindola2013-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184910 91177308-0d34-0410-b5e6-96231b3b80d8
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184853 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove sys::PathSeparator.Rafael Espindola2013-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184852 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another fixme.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184488 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184484 91177308-0d34-0410-b5e6-96231b3b80d8
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184478 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-20
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184464 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-20
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184450 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix get_magic() handling of short reads.Evgeniy Stepanov2013-06-20
| | | | | | | PR16389 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184434 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184431 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MSan hack that is no longer needed.Evgeniy Stepanov2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184428 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getDirectoryContents.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184311 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::canExecute.Rafael Espindola2013-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184298 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::canWrite.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184235 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a can_write function to PathV2.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184233 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused Path::canRead.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove uniqueID from PathV1.h.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184219 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a GetUniqueID that will replace the uniqueID of PathV1.h.Rafael Espindola2013-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184217 91177308-0d34-0410-b5e6-96231b3b80d8
* Only delete regular files and directories.Rafael Espindola2013-06-17
| | | | | | | | This ports a missing feature from PathV1.h. I am not sure how to test this with the regular infrastructure, but an Apple bot should check this when r183985 is reapplied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184119 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix incorrectly finding 'executable' directories instead of files.Manuel Klimek2013-06-17
| | | | | | | | | | | | | | | This broke for example the 'not' utility, if a directory called 'FileCheck' is executable and in the path before the actual 'FileCheck'. This patch steals the implementation of the "old" PathV1 canExecute implementation: - checks for R_OK (file readable): this is necessary for executing scripts; we should not regress here unless we have good reasons - checks for S_ISREG; if we want to get rid of this, we'd need to change all callers who already made the assumption when depending on Path V1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184074 91177308-0d34-0410-b5e6-96231b3b80d8
* Add GetCurrentDirectory back.Rafael Espindola2013-06-14
| | | | | | | | 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? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184009 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace use of PathV1.h in MCContext.cpp.Rafael Espindola2013-06-14
| | | | | | GetCurrentDirectory is now unused. Remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184003 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace use of PathV1.h in Program.cpp.Rafael Espindola2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183996 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PathV1.h in Signals.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183947 91177308-0d34-0410-b5e6-96231b3b80d8
* Have sys::FindProgramByName return a std::string.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Fix handle and memory leak for processes that are not waited forReid Kleckner2013-06-13
| | | | | | | | | | | | Execute's Data parameter is now optional, so we won't allocate memory for it on Windows and we'll close the process handle. The Unix code should probably do something similar to avoid accumulation of zombie children that haven't been waited on. Tested on Linux and Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183906 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the program class.Rafael Espindola2013-06-12
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getMagicNumber.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183839 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::isAbsolute.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183836 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::isAbsolute().Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getSuffix.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183833 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove sys::CopyFile.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183831 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the old file memory mapping functions.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183828 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::createFileOnDisk.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183827 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::makeExecutableOnDisk.Rafael Espindola2013-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183826 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getDirname.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183780 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getBasename.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183779 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::getLast.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183778 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove GetRootDirectory.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183775 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove GetUserHomeDirectory.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183773 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove GetSystemLibraryPaths.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183770 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Path::GetBitcodeLibraryPaths.Rafael Espindola2013-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183765 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove declaration of __clear_cache for __APPLE__. <rdar://problem/13924072>Bob Wilson2013-05-19
| | | | | | | | | | | | | | | This fixes a bootstrapping problem with builds for Apple ARM targets. Clang had the wrong prototype for __clear_cache with ARM targets. Rafael fixed that in clang svn r181784 and r181810, but without those changes, we can't build this code for ARM because clang reports an error about the declaration in Memory.inc not matching the builtin declaration. Some of our buildbots need to use an older compiler that doesn't have the clang fix. Since __clear_cache is never used here when __APPLE__ is defined, I'm just conditionalizing the declaration to match that. I also moved the declaration of sys_icache_invalidate inside the conditional for __APPLE__ while I was at it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182223 91177308-0d34-0410-b5e6-96231b3b80d8
* Invalidate instruction cache when setting memory to be executable.Tim Northover2013-05-19
| | | | | | | | | lli's remote MCJIT code calls setExecutable just prior to running code. In line with Darwin behaviour this seems to be the place to invalidate any caches needed so that relocations can take effect properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182213 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix __clear_cache declaration.Rafael Espindola2013-05-14
| | | | | | This fixes the build with gcc in gnu++98 and gnu++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181811 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare __clear_cache.Rafael Espindola2013-05-14
| | | | | | | | GCC declares __clear_cache in the gnu modes (-std=gnu++98, -std=gnu++11), but not in the strict modes (-std=c++98, -std=c++11). This patch declares it and therefore fixes the build when using one of the strict modes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181785 91177308-0d34-0410-b5e6-96231b3b80d8