Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 | ||||
* | improve haiku portability, patch by Paul Davey. | Chris Lattner | 2010-04-10 | 1 | -0/+2 |
| | | | | llvm-svn: 100933 | ||||
* | Fix a grammaro. | Dan Gohman | 2010-03-30 | 1 | -2/+2 |
| | | | | llvm-svn: 99917 | ||||
* | remove a constructor implementation that isn't declared | Chris Lattner | 2010-03-26 | 1 | -6/+0 |
| | | | | | | | | in the header. How can both clang and gcc accept this? PR6703 llvm-svn: 99658 | ||||
* | Fix a false-positive memory leak in code using RemoveFileOnSignal(). Because | Jeffrey Yasskin | 2010-03-17 | 1 | -17/+10 |
| | | | | | | | | libstdc++'s std::string class points to the interior of an allocation, valgrind reports strings still alive at program termination as possible leaks. I didn't use a ManagedStatic for this because System can't depend on Support. llvm-svn: 98716 | ||||
* | don't forget to close a FD on an error condition, found by | Chris Lattner | 2010-03-14 | 1 | -1/+2 |
| | | | | | | cppcheck, PR6617. Patch by Ettl Martin! llvm-svn: 98525 | ||||
* | follow-on to PR6280 | Chris Lattner | 2010-02-14 | 1 | -1/+1 |
| | | | | llvm-svn: 96172 | ||||
* | improve support for minix, PR6280, patch by | Chris Lattner | 2010-02-12 | 2 | -2/+11 |
| | | | | | | Kees van Reeuwijk! llvm-svn: 95946 | ||||
* | Add llvm::Program::ChangeStderrToBinary(). | Douglas Gregor | 2010-01-28 | 1 | -0/+5 |
| | | | | llvm-svn: 94743 | ||||
* | Fix TimeValue::now() on Unix. | Torok Edwin | 2010-01-22 | 1 | -1/+1 |
| | | | | | | | | | TimeValue()::now().toEpochTime() is supposed to be the same as time(), but it wasn't, because toEpoch subtracted PosixZeroTime, but now() didn't add PosixZeroTime! Add a unittest to check this works. llvm-svn: 94178 | ||||
* | move a few more symbols to .rodata | Nuno Lopes | 2009-12-23 | 1 | -1/+1 |
| | | | | llvm-svn: 92011 | ||||
* | Make Path use StringRef instead of std::string where possible. | Jeffrey Yasskin | 2009-12-17 | 1 | -18/+18 |
| | | | | llvm-svn: 91620 | ||||
* | remove use of SmallVector from Path::makeUnique. Path::makeUnique | Chris Lattner | 2009-12-16 | 1 | -14/+10 |
| | | | | | | is not used by anything performance sensitive, so just use std::string. llvm-svn: 91528 | ||||
* | eliminate an extraneous use of SmallVector in a case where | Chris Lattner | 2009-12-16 | 1 | -6/+4 |
| | | | | | | a fixed size buffer is perfectly fine. llvm-svn: 91527 | ||||
* | Remove spurious extern. | Daniel Dunbar | 2009-12-09 | 1 | -1/+1 |
| | | | | llvm-svn: 90937 | ||||
* | Remove dead returns. | Benjamin Kramer | 2009-11-29 | 1 | -2/+0 |
| | | | | llvm-svn: 90083 | ||||
* | This patch ensures that Path::GetMainExecutable is able to handle the | Kovarththanan Rajaratnam | 2009-11-29 | 1 | -2/+6 |
| | | | | | | | | | case where realpath() fails. When this occurs we segfault trying to create a std::string from a NULL pointer. Fixes PR5635. llvm-svn: 90082 | ||||
* | API change Path::isSpecialFile to Path::isRegularFile, improve semantics in ↵ | Edward O'Callaghan | 2009-11-25 | 1 | -5/+5 |
| | | | | | | regards to comments from 89765 post review. llvm-svn: 89848 | ||||
* | Remove bogus error handling code. | Daniel Dunbar | 2009-11-24 | 1 | -6/+2 |
| | | | | llvm-svn: 89786 | ||||
* | Provide Path::isSpecialFile interface for PR5568. | Edward O'Callaghan | 2009-11-24 | 1 | -2/+20 |
| | | | | llvm-svn: 89765 | ||||
* | Revert commit 81144, and add a comment. It caused bugpoint timeouts | Duncan Sands | 2009-11-08 | 1 | -3/+9 |
| | | | | | | not to work any more on linux. llvm-svn: 86481 | ||||
* | Fix malloc.h is deprecated warning on DragonFly BSD. | Edward O'Callaghan | 2009-11-02 | 1 | -1/+3 |
| | | | | llvm-svn: 85782 | ||||
* | Most stack straces don't need 3 digits worth of levels. | Dan Gohman | 2009-10-30 | 1 | -1/+1 |
| | | | | llvm-svn: 85575 | ||||
* | Move DataTypes.h to include/llvm/System, update all users. This breaks the last | Chandler Carruth | 2009-10-26 | 1 | -1/+1 |
| | | | | | | direct inclusion edge from System to Support. llvm-svn: 85086 | ||||
* | Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' ↵ | Ted Kremenek | 2009-10-22 | 1 | -1/+1 |
| | | | | | | | | | | | prevents it being correct within a multithreaded context. This address: PR 5277 (Program::Wait is unsafe to call from multiple threads). Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into another solution. llvm-svn: 84903 | ||||
* | Haiku porting patches, Credit to Paul Davey. | Edward O'Callaghan | 2009-10-12 | 1 | -1/+1 |
| | | | | llvm-svn: 83823 | ||||
* | Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks | Daniel Dunbar | 2009-09-22 | 1 | -5/+18 |
| | | | | | | ExecuteAndWait. llvm-svn: 82522 | ||||
* | Get rid of GetProcessId in Win32/Program.inc. | Mikhail Glushenkov | 2009-09-15 | 1 | -18/+5 |
| | | | | | | | GetProcessId was introduced only in XP. As a bonus, this change makes Program objects copyable, since Program is now basically a PID. llvm-svn: 81826 | ||||
* | Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't | Dan Gohman | 2009-09-11 | 1 | -13/+7 |
| | | | | | | | | | | | | | | | working. To support this, add an is_displayed() function to raw_ostream, and generalize Process::StandardOutIsDisplayed and friends in order to support it. Also, call RemoveFileOnSignal before creating a file instead of after, so that the file isn't left behind if the program is interrupted between when the file is created and RemoveFileOnSignal is called. While here, add a -S to llvm-extract and port it to IRReader so that it supports assembly input. llvm-svn: 81568 | ||||
* | Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup on | Benjamin Kramer | 2009-09-09 | 1 | -1/+15 |
| | | | | | | clang's testsuite. llvm-svn: 81333 | ||||
* | Check that the 'kill' call succeeded. | Mikhail Glushenkov | 2009-09-09 | 1 | -1/+7 |
| | | | | | | Thanks to Duncan Sands for spotting this. llvm-svn: 81328 | ||||
* | This should unbreak the build on 64-bit Linux. | Mikhail Glushenkov | 2009-09-08 | 1 | -3/+6 |
| | | | | llvm-svn: 81252 | ||||
* | Const-correctness. | Mikhail Glushenkov | 2009-09-08 | 1 | -1/+1 |
| | | | | llvm-svn: 81249 | ||||
* | Get rid of the Pid_ member in the Program class. | Mikhail Glushenkov | 2009-09-08 | 1 | -6/+11 |
| | | | | llvm-svn: 81247 | ||||
* | Add a Kill() function to the Program class. | Mikhail Glushenkov | 2009-09-08 | 1 | -0/+10 |
| | | | | llvm-svn: 81246 | ||||
* | Using a signal handler that does nothing should be | Duncan Sands | 2009-09-07 | 1 | -6/+2 |
| | | | | | | equivalent to SIG_IGN. llvm-svn: 81144 | ||||
* | Remove some not-really-used variables, as warned | Duncan Sands | 2009-09-06 | 1 | -3/+0 |
| | | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. llvm-svn: 81115 |