aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32
Commit message (Collapse)AuthorAgeFilesLines
* ... 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-221-17/+25
| | | | | | 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-151-25/+17
| | | | | | | 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
* Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn'tDan Gohman2009-09-111-3/+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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that the 'kill' call succeeded.Mikhail Glushenkov2009-09-091-1/+6
| | | | | | Thanks to Duncan Sands for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81328 91177308-0d34-0410-b5e6-96231b3b80d8
* Const-correctness.Mikhail Glushenkov2009-09-081-1/+1
| | | | 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-081-14/+18
| | | | 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-081-9/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81246 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-233-7/+6
| | | | | | | | | | | | | | | | | | | | 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
* 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 race condition in getting the process exit code on Win32.Daniel Dunbar2009-08-031-5/+21
| | | | 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
* 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-231-3/+4
| | | | | | | 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-231-4/+3
| | | | | | 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-231-3/+4
| | | | | | | | | | | | | | 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-181-189/+35
| | | | | | | 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
* 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
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-121-0/+23
| | | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75424 91177308-0d34-0410-b5e6-96231b3b80d8
* eraseFromDisk no longer throws.Chris Lattner2009-07-091-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75139 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an ExecuteNoWait interface to support asynchronous process spawning.David Greene2009-07-081-0/+165
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75055 91177308-0d34-0410-b5e6-96231b3b80d8
* remove two methods that no longer exist.Chris Lattner2009-07-081-24/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74982 91177308-0d34-0410-b5e6-96231b3b80d8
* more getting windows to build.Chris Lattner2009-07-081-14/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74981 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully fix the build on windows.Chris Lattner2009-07-081-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed assert that checks return value of TlsSetValue.Oscar Fuentes2009-06-301-1/+1
| | | | | | | | | See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx Patch by Olaf Krzikalla! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74526 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix error in the Win32 implementation pointed out by Howard Su.Owen Anderson2009-06-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74248 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for const thread locals.Owen Anderson2009-06-251-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74226 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a class for supporting platform independent thread-local storage.Owen Anderson2009-06-251-0/+49
| | | | | | | Windows people, please double-check/patch this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74209 91177308-0d34-0410-b5e6-96231b3b80d8
* Guard dynamic library loading.Owen Anderson2009-06-251-4/+15
| | | | | | | | I did my best at implementing this for Win32, but I don't have a way to test it. Can someone with access to a Win32 machine test/fix this? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74188 91177308-0d34-0410-b5e6-96231b3b80d8
* Give RWMutex the SmartRWMutex treatment too.Owen Anderson2009-06-181-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73710 91177308-0d34-0410-b5e6-96231b3b80d8
* Insert a SmartMutex templated class into the class hierarchy, which takes a ↵Owen Anderson2009-06-181-5/+5
| | | | | | | | | template parameter specifying whether this mutex should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73709 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the Win32 reader-writer lock implementation by making it just a normalOwen Anderson2009-06-171-6/+14
| | | | | | | | | | lock. This is obviously bad, but at least it's threadsafe! If you know how to improve this in a pre-Vista friendly well, patches welcome! Patch by Max Burke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73607 91177308-0d34-0410-b5e6-96231b3b80d8
* Accidentally broke this file.Owen Anderson2009-06-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73552 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Win32 implementation, since it doesn't compile pre-Vista.Owen Anderson2009-06-161-12/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73550 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a portable wrapper for reader-writer locks.Owen Anderson2009-06-162-1/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73545 91177308-0d34-0410-b5e6-96231b3b80d8
* "This patch implements the method with the GetModuleFileName function for ↵Chris Lattner2009-06-151-1/+3
| | | | | | | | | windows." Patch by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73379 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new static method to portably determine whether a patch isChris Lattner2009-06-151-0/+14
| | | | | | | absolute or not, based on a patch by Gregory Curfman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73368 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Edwin Török2009-06-041-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72858 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for outputting ANSI colors to raw_fd_ostream.Edwin Török2009-06-041-0/+66
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72854 91177308-0d34-0410-b5e6-96231b3b80d8
* Add terminal width detection to llvm::sys::Process. This is needed toDouglas Gregor2009-05-111-0/+16
| | | | | | | fix Clang PRs 4148 and 4183. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71448 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix choice of version of Windows callback to use to consider not only the ↵Stefanus Du Toit2009-04-281-1/+12
| | | | | | | | Visual Studio version, but also the Windows SDK version. Patch by Tareq Siraj. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70299 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warnings.Anton Korobeynikov2009-04-211-5/+5
| | | | | | Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69679 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop obsolete reference to __eprintf.Anton Korobeynikov2009-04-211-2/+0
| | | | | | Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69678 91177308-0d34-0410-b5e6-96231b3b80d8
* Call CreateProcess with bInheritHandles = TRUE.Mikhail Glushenkov2009-04-141-1/+1
| | | | | | | | Makes llvmc show error messages printed by child processes when run from the Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program has finished execution, this change should be harmless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69082 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete trailing whitespace.Mikhail Glushenkov2009-04-141-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69081 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully fix an apparent build error on windows.Chris Lattner2009-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68175 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::sys::getHostTriple and removeDaniel Dunbar2009-03-311-17/+3
| | | | | | | | | | | | llvm::sys::getOS{Name,Version}. Right now the implementation just derives from LLVM_HOSTTRIPLE (which is wrong, but it doesn't look like we have a define for the target triple). Ideally this routine would actually be able to compute the triple for targets we care about. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68118 91177308-0d34-0410-b5e6-96231b3b80d8