summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-2951-7401/+0
| | | | llvm-svn: 120298
* 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. llvm-svn: 119718
* Fix typo: Exectuable -> ExecutablePeter Collingbourne2010-11-171-1/+1
| | | | llvm-svn: 119433
* 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); } llvm-svn: 119360
* Fix Whitespace.Michael J. Spencer2010-11-101-6/+6
| | | | llvm-svn: 118683
* System/Win32/Path: Implement isSymLink.Michael J. Spencer2010-11-101-1/+9
| | | | llvm-svn: 118681
* 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) llvm-svn: 118678
* System/Path/Windows: Implement GetLLVMDefaultConfigDir.Michael J. Spencer2010-11-091-2/+4
| | | | llvm-svn: 118507
* System/Path/Windows: Generalize GetUserHomeDirectory.Michael J. Spencer2010-11-091-8/+9
| | | | llvm-svn: 118506
* System/Path/Windows: Make GetSystemLibraryPaths more generic.Michael J. Spencer2010-11-092-2/+28
| | | | llvm-svn: 118505
* System/Windows: Reduce dependencies.Michael J. Spencer2010-11-091-0/+1
| | | | llvm-svn: 118504
* System/Windows: Use normalized case and include method.Michael J. Spencer2010-11-091-1/+1
| | | | llvm-svn: 118503
* System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.Michael J. Spencer2010-11-091-3/+3
| | | | llvm-svn: 118502
* Update comment.Michael J. Spencer2010-11-091-1/+1
| | | | llvm-svn: 118501
* Fix PR8441, a thread unsafe static variable in our dynamic library loading ↵Owen Anderson2010-11-091-0/+4
| | | | | | facilities. llvm-svn: 118463
* Remove contributor names as per coding statndard.Michael J. Spencer2010-11-081-3/+0
| | | | llvm-svn: 118442
* Add method for checking if a path is a symbolic link.Rafael Espindola2010-11-072-0/+14
| | | | llvm-svn: 118367
* 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. llvm-svn: 118222
* Delete unused variables.Dan Gohman2010-11-031-3/+0
| | | | llvm-svn: 118128
* Remove several unhelpful checks for isValid from sys::Path.Dan Gohman2010-11-031-26/+4
| | | | llvm-svn: 118127
* Don't try to enforce MAXPATHLEN in sys::Path for Unix. OS's can checkDan Gohman2010-11-021-4/+6
| | | | | | limits on their own. llvm-svn: 118113
* Simplify.Dan Gohman2010-11-021-2/+1
| | | | llvm-svn: 118110
* Fix a copy+pasto.Dan Gohman2010-11-021-1/+2
| | | | llvm-svn: 118106
* Avoid manipulating paths in fixed-sized arrays.Dan Gohman2010-11-021-10/+6
| | | | llvm-svn: 118105
* Simplify this code.Dan Gohman2010-11-021-6/+3
| | | | llvm-svn: 118102
* Use '\0' instead of 0 for nul character constants.Dan Gohman2010-11-021-3/+3
| | | | llvm-svn: 118096
* 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. llvm-svn: 118089
* Eliminate some temporary std::strings.Dan Gohman2010-11-021-4/+4
| | | | llvm-svn: 118086
* Micro-optimize.Dan Gohman2010-11-021-1/+1
| | | | llvm-svn: 118058
* GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov2010-11-021-1/+1
| | | | | | This allows using GetDLLSuffix() with appendSuffix(). llvm-svn: 118051
* Make FindProgramByName return paths with slashes unmodified on Windows.Mikhail Glushenkov2010-11-022-4/+6
| | | | | | This makes its behaviour more consistent across platforms. llvm-svn: 118048
* 80-col violations.Mikhail Glushenkov2010-11-021-3/+5
| | | | llvm-svn: 118045
* Path: Add GetEXESuffix() to complement GetDLLSuffix().Mikhail Glushenkov2010-11-022-0/+9
| | | | llvm-svn: 118042
* Check if ErrMsg is null. This fixes the "not" command.Dan Gohman2010-10-291-6/+11
| | | | llvm-svn: 117666
* Make Program::Wait differentiate execution failure due to the fileDan Gohman2010-10-293-9/+13
| | | | | | being not found from the file being not executable. llvm-svn: 117664
* Make Program::Wait provide an error message string for errorsDan Gohman2010-10-291-9/+19
| | | | | | executing the child process and abnormal child process termination. llvm-svn: 117661
* 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.) llvm-svn: 117596
* 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). llvm-svn: 117582
* Trailing whitespace.Mikhail Glushenkov2010-10-281-4/+4
| | | | llvm-svn: 117581
* Reindent.Mikhail Glushenkov2010-10-281-71/+71
| | | | llvm-svn: 117538
* 80-col violation.Mikhail Glushenkov2010-10-271-1/+2
| | | | llvm-svn: 117443
* 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 llvm-svn: 117442
* 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. llvm-svn: 117262
* Win32/Signals.inc: DontRemoveFileOnSignal(): Please acquire the CriticalSection.NAKAMURA Takumi2010-10-221-0/+2
| | | | | | It choked BugPoint on Mingw. llvm-svn: 117083
* Trailing whitespace.Mikhail Glushenkov2010-10-211-5/+5
| | | | llvm-svn: 117058
* Use C++03...Michael J. Spencer2010-10-201-1/+6
| | | | llvm-svn: 116927
* 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. llvm-svn: 116925
* Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete threeChandler Carruth2010-10-201-2/+2
| | | | | | #includes in the process. llvm-svn: 116919
* Add ATTRIBUTE_UNUSED for -Asserts.NAKAMURA Takumi2010-10-202-4/+4
| | | | llvm-svn: 116909
* lib/System/Win32/ThreadLocal.inc: Suppress "unused" warning on -Asserts.NAKAMURA Takumi2010-10-191-0/+1
| | | | llvm-svn: 116785
OpenPOWER on IntegriCloud