summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
Commit message (Collapse)AuthorAgeFilesLines
* Trailing whitespace.Mikhail Glushenkov2010-10-281-4/+4
| | | | llvm-svn: 117581
* CrashRecovery: Fix raise() override to actually send the right signal, *cough*.Daniel Dunbar2010-10-081-1/+1
| | | | llvm-svn: 116072
* Correctly check if a path is a directory. Fix by Brian Korver.Evan Cheng2010-10-071-1/+1
| | | | llvm-svn: 115991
* Add an explicit initialization to work around what appears to be a valgrindDaniel Dunbar2010-09-301-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'tDaniel Dunbar2010-09-221-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 forDan Gohman2010-09-071-0/+2
| | | | | | GetMainExecutable yet. llvm-svn: 113240
* Apply a patch from Kees van Reeuwijk to add support for Minix.Dan Gohman2010-09-021-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 Gohman2010-09-011-0/+10
| | | | llvm-svn: 112705
* Some fixes for NetBSDAnton Korobeynikov2010-08-311-3/+3
| | | | llvm-svn: 112662
* CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread insteadDaniel Dunbar2010-08-191-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 Gohman2010-08-041-2/+2
| | | | llvm-svn: 110183
* Add an erase() method to llvm::ThreadLocal.Owen Anderson2010-07-281-0/+1
| | | | llvm-svn: 109686
* Rather than using an ifdef on the target to zero out fields,Duncan Sands2010-07-141-4/+1
| | | | | | just use memset to zero the entire struct. llvm-svn: 108330
* improve Path::makeUnique when mkstemp/mktemp are not availableChris Lattner2010-07-121-7/+12
| | | | | | patch by Lasse Kärkkäinen in PR7404. llvm-svn: 108110
* add some triple for minix, patch by Kees van Reeuwijk from PR7582Chris Lattner2010-07-071-1/+1
| | | | llvm-svn: 107785
* Factor out the handler work from SignalHandler into a helper function,Dan Gohman2010-05-271-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 numberDan Gohman2010-05-271-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 cleanupDaniel Dunbar2010-05-081-1/+3
| | | | | | stuff. llvm-svn: 103333
* This doesn't need SmallVector.h anymore.Dan Gohman2010-04-191-1/+0
| | | | llvm-svn: 101790
* Fix this for std::vectors which don't have .data().Dan Gohman2010-04-191-1/+1
| | | | llvm-svn: 101785
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-6/+10
| | | | llvm-svn: 101782
* Revert 91528 and use a std::vector instead, fixing an abuse of std::string.Dan Gohman2010-04-191-10/+16
| | | | llvm-svn: 101781
* avoid temporary std::string in non posix_spawn path.Chris Lattner2010-04-181-4/+4
| | | | llvm-svn: 101723
* Eliminate temporary string.Benjamin Kramer2010-04-181-4/+4
| | | | llvm-svn: 101711
* Properly inherit the environment on darwin where environ is not available ↵Benjamin Kramer2010-04-181-1/+6
| | | | | | for shared libraries. llvm-svn: 101710
* This is horrible. Split the difference, and declare 'environ' on all non-DarwinNick Lewycky2010-04-181-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 Lewycky2010-04-181-3/+0
| | | | llvm-svn: 101702
* Fix linux build. posix_spawn doesn't inherit the environment by default.Nick Lewycky2010-04-181-1/+4
| | | | llvm-svn: 101701
* make Program::Execute use posix_spawn on systems that support it,Chris Lattner2010-04-181-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 Lattner2010-04-101-0/+2
| | | | llvm-svn: 100933
* Fix a grammaro.Dan Gohman2010-03-301-2/+2
| | | | llvm-svn: 99917
* remove a constructor implementation that isn't declaredChris Lattner2010-03-261-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(). BecauseJeffrey Yasskin2010-03-171-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 byChris Lattner2010-03-141-1/+2
| | | | | | cppcheck, PR6617. Patch by Ettl Martin! llvm-svn: 98525
* follow-on to PR6280Chris Lattner2010-02-141-1/+1
| | | | llvm-svn: 96172
* improve support for minix, PR6280, patch byChris Lattner2010-02-122-2/+11
| | | | | | Kees van Reeuwijk! llvm-svn: 95946
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-281-0/+5
| | | | llvm-svn: 94743
* Fix TimeValue::now() on Unix.Torok Edwin2010-01-221-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 .rodataNuno Lopes2009-12-231-1/+1
| | | | llvm-svn: 92011
* Make Path use StringRef instead of std::string where possible.Jeffrey Yasskin2009-12-171-18/+18
| | | | llvm-svn: 91620
* remove use of SmallVector from Path::makeUnique. Path::makeUniqueChris Lattner2009-12-161-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 whereChris Lattner2009-12-161-6/+4
| | | | | | a fixed size buffer is perfectly fine. llvm-svn: 91527
* Remove spurious extern.Daniel Dunbar2009-12-091-1/+1
| | | | llvm-svn: 90937
* Remove dead returns.Benjamin Kramer2009-11-291-2/+0
| | | | llvm-svn: 90083
* This patch ensures that Path::GetMainExecutable is able to handle theKovarththanan Rajaratnam2009-11-291-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'Callaghan2009-11-251-5/+5
| | | | | | regards to comments from 89765 post review. llvm-svn: 89848
* Remove bogus error handling code.Daniel Dunbar2009-11-241-6/+2
| | | | llvm-svn: 89786
* Provide Path::isSpecialFile interface for PR5568.Edward O'Callaghan2009-11-241-2/+20
| | | | llvm-svn: 89765
* Revert commit 81144, and add a comment. It caused bugpoint timeoutsDuncan Sands2009-11-081-3/+9
| | | | | | not to work any more on linux. llvm-svn: 86481
* Fix malloc.h is deprecated warning on DragonFly BSD.Edward O'Callaghan2009-11-021-1/+3
| | | | llvm-svn: 85782
OpenPOWER on IntegriCloud