Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge System into Support. | Michael J. Spencer | 2010-11-29 | 14 | -2540/+0 |
| | | | | llvm-svn: 120298 | ||||
* | This is the first step in adding sane error handling support to LLVMSystem. | Michael J. Spencer | 2010-11-16 | 1 | -0/+34 |
| | | | | | | | | | | | | | | | | | The system API's will be shifted over to returning an error_code, and returning other return values as out parameters to the function. Code that needs to check error conditions will use the errc enum values which are the same as the posix_errno defines (EBADF, E2BIG, etc...), and are compatable with the error codes in WinError.h due to some magic in system_error. An example would be: if (error_code ec = KillEvil("Java")) { // error_code can be converted to bool. handle_error(ec); } llvm-svn: 119360 | ||||
* | Add method for checking if a path is a symbolic link. | Rafael Espindola | 2010-11-07 | 1 | -0/+9 |
| | | | | llvm-svn: 118367 | ||||
* | Delete unused variables. | Dan Gohman | 2010-11-03 | 1 | -3/+0 |
| | | | | llvm-svn: 118128 | ||||
* | Remove several unhelpful checks for isValid from sys::Path. | Dan Gohman | 2010-11-03 | 1 | -26/+4 |
| | | | | llvm-svn: 118127 | ||||
* | Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can check | Dan Gohman | 2010-11-02 | 1 | -4/+6 |
| | | | | | | limits on their own. llvm-svn: 118113 | ||||
* | Simplify. | Dan Gohman | 2010-11-02 | 1 | -2/+1 |
| | | | | llvm-svn: 118110 | ||||
* | Fix a copy+pasto. | Dan Gohman | 2010-11-02 | 1 | -1/+2 |
| | | | | llvm-svn: 118106 | ||||
* | Avoid manipulating paths in fixed-sized arrays. | Dan Gohman | 2010-11-02 | 1 | -10/+6 |
| | | | | llvm-svn: 118105 | ||||
* | Simplify this code. | Dan Gohman | 2010-11-02 | 1 | -6/+3 |
| | | | | llvm-svn: 118102 | ||||
* | Use '\0' instead of 0 for nul character constants. | Dan Gohman | 2010-11-02 | 1 | -3/+3 |
| | | | | llvm-svn: 118096 | ||||
* | appendSuffix: don't append a dot when the suffix is empty. | Mikhail Glushenkov | 2010-11-02 | 1 | -12/+0 |
| | | | | | | | Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. llvm-svn: 118089 | ||||
* | Eliminate some temporary std::strings. | Dan Gohman | 2010-11-02 | 1 | -4/+4 |
| | | | | llvm-svn: 118086 | ||||
* | Micro-optimize. | Dan Gohman | 2010-11-02 | 1 | -1/+1 |
| | | | | llvm-svn: 118058 | ||||
* | Make FindProgramByName return paths with slashes unmodified on Windows. | Mikhail Glushenkov | 2010-11-02 | 1 | -2/+2 |
| | | | | | | This makes its behaviour more consistent across platforms. llvm-svn: 118048 | ||||
* | Path: Add GetEXESuffix() to complement GetDLLSuffix(). | Mikhail Glushenkov | 2010-11-02 | 1 | -0/+4 |
| | | | | llvm-svn: 118042 | ||||
* | Check if ErrMsg is null. This fixes the "not" command. | Dan Gohman | 2010-10-29 | 1 | -6/+11 |
| | | | | llvm-svn: 117666 | ||||
* | Make Program::Wait differentiate execution failure due to the file | Dan Gohman | 2010-10-29 | 1 | -7/+10 |
| | | | | | | being not found from the file being not executable. llvm-svn: 117664 | ||||
* | Make Program::Wait provide an error message string for errors | Dan Gohman | 2010-10-29 | 1 | -9/+19 |
| | | | | | | executing the child process and abnormal child process termination. llvm-svn: 117661 | ||||
* | Revert r117582, which reverted r77396. Searching PATH for a string | Dan Gohman | 2010-10-28 | 1 | -1/+1 |
| | | | | | | | | | | | | which contains slashes is inconsistent with the meaning of PATH on Unix-type platforms, and pretty surprising. If the user has given a specific path to execute and we can't execute it, we should fail and say why. (Apparently the new posix_spawn code doesn't always say why, but that's a separate issue.) llvm-svn: 117596 | ||||
* | Revert r77396. | Mikhail Glushenkov | 2010-10-28 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Original commit message: On "Unix", if Program::FindProgramByName is given a name containing slashes, just go with it, regardless of whether it looks like it will be executable. This follows the behavior of sh(1) more closely. It's better when behaviour is consistent between platforms. This change also makes FindExecutable() behave as expected on unix-likes (before this commit, it used to always succeed). llvm-svn: 117582 | ||||
* | Trailing whitespace. | Mikhail Glushenkov | 2010-10-28 | 1 | -4/+4 |
| | | | | llvm-svn: 117581 | ||||
* | CrashRecovery: Fix raise() override to actually send the right signal, *cough*. | Daniel Dunbar | 2010-10-08 | 1 | -1/+1 |
| | | | | llvm-svn: 116072 | ||||
* | Correctly check if a path is a directory. Fix by Brian Korver. | Evan Cheng | 2010-10-07 | 1 | -1/+1 |
| | | | | llvm-svn: 115991 | ||||
* | Add an explicit initialization to work around what appears to be a valgrind | Daniel Dunbar | 2010-09-30 | 1 | -1/+3 |
| | | | | | | false positive, at least on Darwin. I haven't filed this, but you can feel free. llvm-svn: 115242 | ||||
* | CrashRecovery/Darwin: Override raise() as well so that crash recovery doesn't | Daniel Dunbar | 2010-09-22 | 1 | -1/+5 |
| | | | | | | | end up altering the thread on which crashes are done because of its use of Darwin's broken raise() implementation. llvm-svn: 114558 | ||||
* | Issue a #error if the host doesn't have an implementation for | Dan Gohman | 2010-09-07 | 1 | -0/+2 |
| | | | | | | GetMainExecutable yet. llvm-svn: 113240 | ||||
* | Apply a patch from Kees van Reeuwijk to add support for Minix. | Dan Gohman | 2010-09-02 | 1 | -3/+3 |
| | | | | | | | Minix apparently doesn't like double-slash separators, and there's no apparent need for them here. llvm-svn: 112844 | ||||
* | Add an interface for unregistering a file from the FilesToRemove list. | Dan Gohman | 2010-09-01 | 1 | -0/+10 |
| | | | | llvm-svn: 112705 | ||||
* | Some fixes for NetBSD | Anton Korobeynikov | 2010-08-31 | 1 | -3/+3 |
| | | | | llvm-svn: 112662 | ||||
* | CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread instead | Daniel Dunbar | 2010-08-19 | 1 | -0/+34 |
| | | | | | | | | | of the current thread. This has the unfortunate effect that assert() and abort() will end up bypassing our crash recovery attempts. We work around this for anything in the same linkage unit by just defining our own versions of the assert handler and abort. llvm-svn: 111583 | ||||
* | Eliminate unnecessary empty string literals. | Dan Gohman | 2010-08-04 | 1 | -2/+2 |
| | | | | llvm-svn: 110183 | ||||
* | Add an erase() method to llvm::ThreadLocal. | Owen Anderson | 2010-07-28 | 1 | -0/+1 |
| | | | | llvm-svn: 109686 | ||||
* | Rather than using an ifdef on the target to zero out fields, | Duncan Sands | 2010-07-14 | 1 | -4/+1 |
| | | | | | | just use memset to zero the entire struct. llvm-svn: 108330 | ||||
* | improve Path::makeUnique when mkstemp/mktemp are not available | Chris Lattner | 2010-07-12 | 1 | -7/+12 |
| | | | | | | patch by Lasse Kärkkäinen in PR7404. llvm-svn: 108110 | ||||
* | add some triple for minix, patch by Kees van Reeuwijk from PR7582 | Chris Lattner | 2010-07-07 | 1 | -1/+1 |
| | | | | llvm-svn: 107785 | ||||
* | Factor out the handler work from SignalHandler into a helper function, | Dan Gohman | 2010-05-27 | 1 | -5/+12 |
| | | | | | | | | | and change llvm::sys::RunInterruptHandlers to call that function directly instead of calling SignalHandler, because the rest of SignalHandler invokes side effects which aren't appropriate, including raising the signal. llvm-svn: 104896 | ||||
* | Don't bother clearing the Magic string when the magic number | Dan Gohman | 2010-05-27 | 1 | -3/+1 |
| | | | | | | can't be read, since it isn't cleared on other error paths. llvm-svn: 104852 | ||||
* | Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup | Daniel Dunbar | 2010-05-08 | 1 | -1/+3 |
| | | | | | | stuff. llvm-svn: 103333 | ||||
* | This doesn't need SmallVector.h anymore. | Dan Gohman | 2010-04-19 | 1 | -1/+0 |
| | | | | llvm-svn: 101790 | ||||
* | Fix this for std::vectors which don't have .data(). | Dan Gohman | 2010-04-19 | 1 | -1/+1 |
| | | | | llvm-svn: 101785 | ||||
* | Fix -Wcast-qual warnings. | Dan Gohman | 2010-04-19 | 1 | -6/+10 |
| | | | | llvm-svn: 101782 | ||||
* | Revert 91528 and use a std::vector instead, fixing an abuse of std::string. | Dan Gohman | 2010-04-19 | 1 | -10/+16 |
| | | | | llvm-svn: 101781 | ||||
* | avoid temporary std::string in non posix_spawn path. | Chris Lattner | 2010-04-18 | 1 | -4/+4 |
| | | | | llvm-svn: 101723 | ||||
* | Eliminate temporary string. | Benjamin Kramer | 2010-04-18 | 1 | -4/+4 |
| | | | | llvm-svn: 101711 | ||||
* | Properly inherit the environment on darwin where environ is not available ↵ | Benjamin Kramer | 2010-04-18 | 1 | -1/+6 |
| | | | | | | for shared libraries. llvm-svn: 101710 | ||||
* | This is horrible. Split the difference, and declare 'environ' on all non-Darwin | Nick Lewycky | 2010-04-18 | 1 | -0/+7 |
| | | | | | | | platforms to unbreak the darwin and linux builds. The BSD folks should feel free to change the #if, if this breaks them. llvm-svn: 101703 | ||||
* | Revert r101701, Darwin doesn't have 'environ'. Go figure. | Nick Lewycky | 2010-04-18 | 1 | -3/+0 |
| | | | | llvm-svn: 101702 | ||||
* | Fix linux build. posix_spawn doesn't inherit the environment by default. | Nick Lewycky | 2010-04-18 | 1 | -1/+4 |
| | | | | llvm-svn: 101701 | ||||
* | make Program::Execute use posix_spawn on systems that support it, | Chris Lattner | 2010-04-18 | 1 | -9/+64 |
| | | | | | | | | | as it is more efficient than fork/exec. Thanks to Eric for adding the autoconf check. It would be nice if a cmake guru could add a cmake check for posix_spawn as well. llvm-svn: 101693 |