aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
Commit message (Collapse)AuthorAgeFilesLines
* Update build scripts after merge r127116Jush Lu2011-03-101-61/+0
|
* Merge upstream r127116Jush Lu2011-03-0948-7108/+0
|\
| * Merge System into Support.Michael J. Spencer2010-11-2951-7401/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use thread-safe statics to avoid a static constructor here. This isn't ↵Owen Anderson2010-11-181-3/+15
| | | | | | | | | | | | | | | | | | thread-safe on MSVC, but we don't support threaded LLVM there anyways. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119718 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix typo: Exectuable -> ExecutablePeter Collingbourne2010-11-171-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119433 91177308-0d34-0410-b5e6-96231b3b80d8
| * This is the first step in adding sane error handling support to LLVMSystem.Michael J. Spencer2010-11-164-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119360 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix Whitespace.Michael J. Spencer2010-11-101-6/+6
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118683 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Win32/Path: Implement isSymLink.Michael J. Spencer2010-11-101-1/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118681 91177308-0d34-0410-b5e6-96231b3b80d8
| * Win32/Process.inc: [PR8527] Process::FileDescriptorIsDisplayed(fd) should ↵NAKAMURA Takumi2010-11-101-1/+2
| | | | | | | | | | | | | | | | not check by FILE_TYPE_CHAR. It must be better to check it with Console API. The special file "NUL" is FILE_TYPE_CHAR with GetFileType(h). It was treated as display device and discarding output to NUL had failed. (eg. opt -o nul) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118678 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Path/Windows: Implement GetLLVMDefaultConfigDir.Michael J. Spencer2010-11-091-2/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118507 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Path/Windows: Generalize GetUserHomeDirectory.Michael J. Spencer2010-11-091-8/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118506 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Path/Windows: Make GetSystemLibraryPaths more generic.Michael J. Spencer2010-11-092-2/+28
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118505 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Windows: Reduce dependencies.Michael J. Spencer2010-11-091-0/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118504 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Windows: Use normalized case and include method.Michael J. Spencer2010-11-091-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118503 91177308-0d34-0410-b5e6-96231b3b80d8
| * System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.Michael J. Spencer2010-11-091-3/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118502 91177308-0d34-0410-b5e6-96231b3b80d8
| * Update comment.Michael J. Spencer2010-11-091-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118501 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix PR8441, a thread unsafe static variable in our dynamic library loading ↵Owen Anderson2010-11-091-0/+4
| | | | | | | | | | | | facilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118463 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove contributor names as per coding statndard.Michael J. Spencer2010-11-081-3/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118442 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add method for checking if a path is a symbolic link.Rafael Espindola2010-11-072-0/+14
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118367 91177308-0d34-0410-b5e6-96231b3b80d8
| * System: Add llvm_execute_on_thread, which does what it says.Daniel Dunbar2010-11-041-0/+52
| | | | | | | | | | | | | | - Primarily useful for running some code with a specified stack size, when pthreads are available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118222 91177308-0d34-0410-b5e6-96231b3b80d8
| * Delete unused variables.Dan Gohman2010-11-031-3/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118128 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove several unhelpful checks for isValid from sys::Path.Dan Gohman2010-11-031-26/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118127 91177308-0d34-0410-b5e6-96231b3b80d8
| * Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can checkDan Gohman2010-11-021-4/+6
| | | | | | | | | | | | | | limits on their own. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118113 91177308-0d34-0410-b5e6-96231b3b80d8
| * Simplify.Dan Gohman2010-11-021-2/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118110 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix a copy+pasto.Dan Gohman2010-11-021-1/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118106 91177308-0d34-0410-b5e6-96231b3b80d8
| * Avoid manipulating paths in fixed-sized arrays.Dan Gohman2010-11-021-10/+6
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118105 91177308-0d34-0410-b5e6-96231b3b80d8
| * Simplify this code.Dan Gohman2010-11-021-6/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118102 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use '\0' instead of 0 for nul character constants.Dan Gohman2010-11-021-3/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118096 91177308-0d34-0410-b5e6-96231b3b80d8
| * appendSuffix: don't append a dot when the suffix is empty.Mikhail Glushenkov2010-11-023-24/+15
| | | | | | | | | | | | | | Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118089 91177308-0d34-0410-b5e6-96231b3b80d8
| * Eliminate some temporary std::strings.Dan Gohman2010-11-021-4/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118086 91177308-0d34-0410-b5e6-96231b3b80d8
| * Micro-optimize.Dan Gohman2010-11-021-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118058 91177308-0d34-0410-b5e6-96231b3b80d8
| * GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov2010-11-021-1/+1
| | | | | | | | | | | | This allows using GetDLLSuffix() with appendSuffix(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118051 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make FindProgramByName return paths with slashes unmodified on Windows.Mikhail Glushenkov2010-11-022-4/+6
| | | | | | | | | | | | This makes its behaviour more consistent across platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118048 91177308-0d34-0410-b5e6-96231b3b80d8
| * 80-col violations.Mikhail Glushenkov2010-11-021-3/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118045 91177308-0d34-0410-b5e6-96231b3b80d8
| * Path: Add GetEXESuffix() to complement GetDLLSuffix().Mikhail Glushenkov2010-11-022-0/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118042 91177308-0d34-0410-b5e6-96231b3b80d8
| * Check if ErrMsg is null. This fixes the "not" command.Dan Gohman2010-10-291-6/+11
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117666 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make Program::Wait differentiate execution failure due to the fileDan Gohman2010-10-293-9/+13
| | | | | | | | | | | | | | being not found from the file being not executable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117664 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make Program::Wait provide an error message string for errorsDan Gohman2010-10-291-9/+19
| | | | | | | | | | | | | | executing the child process and abnormal child process termination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117661 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r117582, which reverted r77396. Searching PATH for a stringDan Gohman2010-10-281-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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117596 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r77396.Mikhail Glushenkov2010-10-281-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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117582 91177308-0d34-0410-b5e6-96231b3b80d8
| * Trailing whitespace.Mikhail Glushenkov2010-10-281-4/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117581 91177308-0d34-0410-b5e6-96231b3b80d8
| * Reindent.Mikhail Glushenkov2010-10-281-71/+71
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117538 91177308-0d34-0410-b5e6-96231b3b80d8
| * 80-col violation.Mikhail Glushenkov2010-10-271-1/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117443 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove try/catch(...) from Win32/Signals.inc.Mikhail Glushenkov2010-10-272-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | catch(...) is used in Win32/Signals.inc for catching Win32 structured exceptions, but according to [1], this is wrong. We can't simply change try/catch to __try/__finally, since this syntax is not supported by MinGW. We can use __try/__finally on MSVC and __try1/__except1 macros on MinGW [2], but I think that that solution obfuscates the code too much. The use of try/catch(...) in Signals.inc makes it impossible to link MinGW-compiled libSystem with llvm-gcc compiled executables. I propose that we just remove try/catch(...) from Signals.inc, since the meaning of the code won't change. [1] http://members.cox.net/doug_web/eh.htm [2] http://article.gmane.org/gmane.comp.compilers.llvm.cvs/81315 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117442 91177308-0d34-0410-b5e6-96231b3b80d8
| * ATTRIBUTE_UNUSED has been renamed to LLVM_ATTRIBUTE_UNUSED.Duncan Sands2010-10-251-2/+2
| | | | | | | | | | | | | | | | Rather than rename this instance, use the cast-to-void idiom instead. This will hopefully fix the windows buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117262 91177308-0d34-0410-b5e6-96231b3b80d8
| * Win32/Signals.inc: DontRemoveFileOnSignal(): Please acquire the CriticalSection.NAKAMURA Takumi2010-10-221-0/+2
| | | | | | | | | | | | It choked BugPoint on Mingw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117083 91177308-0d34-0410-b5e6-96231b3b80d8
| * Trailing whitespace.Mikhail Glushenkov2010-10-211-5/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117058 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use C++03...Michael J. Spencer2010-10-201-1/+6
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116927 91177308-0d34-0410-b5e6-96231b3b80d8
| * System-Win32/Path: Fix incorrect assumption in isValid.Michael J. Spencer2010-10-201-0/+9
| | | | | | | | | | | | | | A recent commit to clang exposed a bug in the Win32 Path code. This is a minimal fix for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116925 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete threeChandler Carruth2010-10-201-2/+2
| | | | | | | | | | | | | | #includes in the process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116919 91177308-0d34-0410-b5e6-96231b3b80d8