aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
Commit message (Collapse)AuthorAgeFilesLines
* Haiku porting patches, Credit to Paul Davey.Edward O'Callaghan2009-10-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83823 91177308-0d34-0410-b5e6-96231b3b80d8
* MingW build fixesBenjamin Kramer2009-10-021-0/+6
| | | | | | | | | | | - MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem. Noticed by Ronald Pijnacker! - Some parts of the System library must be build with exceptions on windows. Based on a patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83251 91177308-0d34-0410-b5e6-96231b3b80d8
* ... missed hiding a variable for MSVC only.Daniel Dunbar2009-09-221-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82552 91177308-0d34-0410-b5e6-96231b3b80d8
* Hide MSVC specific CRT interaction behind _MSC_VER.Daniel Dunbar2009-09-221-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82551 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the GetProcessId() call from Win32/Program.inc, take 2.Mikhail Glushenkov2009-09-221-9/+23
| | | | | | | GetProcessId() was introduced only in Windows XP, and we want to support earlier versions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82548 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in ↵Daniel Dunbar2009-09-221-1/+39
| | | | | | | | RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing. Also, tweak the 'lit' test runner to set this variable unconditionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82537 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaksDaniel Dunbar2009-09-222-22/+43
| | | | | | ExecuteAndWait. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82522 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of GetProcessId in Win32/Program.inc.Mikhail Glushenkov2009-09-152-43/+22
| | | | | | | GetProcessId was introduced only in XP. As a bonus, this change makes Program objects copyable, since Program is now basically a PID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81826 91177308-0d34-0410-b5e6-96231b3b80d8
* Experimental fix for PR4960.Daniel Dunbar2009-09-121-5/+14
| | | | | | - Could we just always implement this as __clear_cache for __GNUC__? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81655 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn'tDan Gohman2009-09-112-16/+14
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup onBenjamin Kramer2009-09-091-1/+15
| | | | | | | clang's testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81333 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that the 'kill' call succeeded.Mikhail Glushenkov2009-09-092-2/+13
| | | | | | Thanks to Duncan Sands for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81328 91177308-0d34-0410-b5e6-96231b3b80d8
* This should unbreak the build on 64-bit Linux.Mikhail Glushenkov2009-09-081-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81252 91177308-0d34-0410-b5e6-96231b3b80d8
* Const-correctness.Mikhail Glushenkov2009-09-082-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81249 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pid_ member in the Program class.Mikhail Glushenkov2009-09-082-20/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81247 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Kill() function to the Program class.Mikhail Glushenkov2009-09-082-9/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81246 91177308-0d34-0410-b5e6-96231b3b80d8
* Using a signal handler that does nothing should beDuncan Sands2009-09-071-6/+2
| | | | | | | equivalent to SIG_IGN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81144 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some not-really-used variables, as warnedDuncan Sands2009-09-061-3/+0
| | | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81115 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak code into an equivalent form for which iccDuncan Sands2009-09-063-17/+13
| | | | | | | | doesn't warn about unreachable instructions. Patch by Erick Tryzelaar (#111). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve llvm::getHostTriple for some cases where the LLVM_HOSTTRIPLE is notDaniel Dunbar2009-09-031-4/+42
| | | | | | reliable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80863 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ExplicitSymbols leak.Edwin Török2009-08-311-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80589 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the last uses of Config/alloca.hChris Lattner2009-08-231-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79873 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-237-26/+16
| | | | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of a helgrind warning. If this is _actually_ a performance problem,Owen Anderson2009-08-191-3/+3
| | | | | | | we can find a way to cache the answer that isn't racy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79472 91177308-0d34-0410-b5e6-96231b3b80d8
* Add locking around signal handler registration.Owen Anderson2009-08-171-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79254 91177308-0d34-0410-b5e6-96231b3b80d8
* This void is implicit in C++.Dan Gohman2009-08-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
* improve win32 path support, patch by Baptiste Lepilleur!Chris Lattner2009-08-121-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78823 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of namespace pollution.Dan Gohman2009-08-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2009-08-051-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78239 91177308-0d34-0410-b5e6-96231b3b80d8
* Update a comment to reflect the current code.Dan Gohman2009-08-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78215 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove needless uses of std::flush in the parent process after aDan Gohman2009-08-051-7/+0
| | | | | | | | fork call. This eliminates a need for <iostream>. Also remove needless fsync calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78131 91177308-0d34-0410-b5e6-96231b3b80d8
* Use _exit rather than exit in the child process after a failed exec.Dan Gohman2009-08-051-3/+7
| | | | | | | Add a comment explaining why. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78128 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow Unix behavior and return 127 if the command is not found,Dan Gohman2009-08-041-1/+1
| | | | | | | and 126 if it is not executable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78120 91177308-0d34-0410-b5e6-96231b3b80d8
* When exec() fails, return 127 instead of errno; the parent process has no way toDaniel Dunbar2009-08-041-3/+3
| | | | | | | | distinguish that the result is errno, so it can't use it to provide more information about the error (it also exposes the numeric value of errno). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78098 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a race condition in getting the process exit code on Win32.Daniel Dunbar2009-08-032-5/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77953 91177308-0d34-0410-b5e6-96231b3b80d8
* Empty arguments need to be quoted on Win32.Daniel Dunbar2009-08-021-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77913 91177308-0d34-0410-b5e6-96231b3b80d8
* eXtensible Systems doesn't exist any more and Reid donated this to theChris Lattner2009-08-011-6/+0
| | | | | | | project under the normal license, yay. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77823 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove another F_OK.Dan Gohman2009-07-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77405 91177308-0d34-0410-b5e6-96231b3b80d8
* On "Unix", if Program::FindProgramByName is given a name containingDan Gohman2009-07-281-1/+1
| | | | | | | | slashes, just go with it, regardless of whether it looks like it will be executable. This follows the behavior of sh(1) more closely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77396 91177308-0d34-0410-b5e6-96231b3b80d8
* It isn't necessary to use F_OK when using R_OK or similar.Dan Gohman2009-07-281-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77392 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a fixme; don't take binaries from the working directory.Benjamin Kramer2009-07-281-3/+3
| | | | | | | | This fixes clang on non-darwin platforms if a file called 'ld' or 'as' is in the working directory. Based on patch by Pawel Worach! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77379 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: make sure that the *.inc files for libSystem show up in the resulting Douglas Gregor2009-07-271-0/+23
| | | | | | | project. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77213 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use llvm_report_error in libSystem, this is a layering violation.Daniel Dunbar2009-07-261-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77169 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-committing r76828 with the JIT memory manager changes now that the buildReid Kleckner2009-07-232-6/+8
| | | | | | | bots like the BumpPtrAllocator changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r76825 and r76828, since they caused clang runtime errors and some ↵Reid Kleckner2009-07-232-8/+6
| | | | | | build failure involving memset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the JIT code emitter properly retry and ask for more memory when it runsReid Kleckner2009-07-232-6/+8
| | | | | | | | | | | | | | out of memory, and also make the default memory manager allocate more memory when it runs out. Also, switch function stubs and global data over to using the BumpPtrAllocator. This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB of memory, and instead allocates in 512K slabs. I suspect this size could go lower, especially on embedded platforms, now that more slabs can be allocated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76828 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplication in Program::Execute{And,No}Wait.Mikhail Glushenkov2009-07-183-276/+91
| | | | | | | Implemented by moving the code out of static functions into methods of Program class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76340 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2009-07-171-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76229 91177308-0d34-0410-b5e6-96231b3b80d8
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75831 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm_report_error, not llvm_unreachable.Daniel Dunbar2009-07-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75429 91177308-0d34-0410-b5e6-96231b3b80d8