summaryrefslogtreecommitdiff
path: root/lib/System
Commit message (Collapse)AuthorAge
* Add an interface for unregistering a file from the FilesToRemove list.Dan Gohman2010-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112705 91177308-0d34-0410-b5e6-96231b3b80d8
* Some fixes for NetBSDAnton Korobeynikov2010-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112662 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup Whitespace.Michael J. Spencer2010-08-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112587 91177308-0d34-0410-b5e6-96231b3b80d8
* System: Fix getMagicNumber on windows.Michael J. Spencer2010-08-31
| | | | | | | | | | getMagicNumber was treating the _binary_ data it read in as a null terminated string. This resulted in the std::string calculating the length, and causing an assert in other code that assumed that the length it passed was the same as the length of the string it would get back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112586 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't cast Win32 FILETIME structs to int64. Patch by Dimitry Andric!Michael J. Spencer2010-08-28
| | | | | | | | | | | | | | | According to the Microsoft documentation here: http://msdn.microsoft.com/en-us/library/ms724284%28VS.85%29.aspx this cast used in lib/System/Win32/Path.inc: __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); should not be done. The documentation says: "Do not cast a pointer to a FILETIME structure to either a ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112376 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix --disable-threads build, PR7949.Daniel Dunbar2010-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111676 91177308-0d34-0410-b5e6-96231b3b80d8
* CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread insteadDaniel Dunbar2010-08-19
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111583 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix failure of unittests/ExecutionEngine/JIT/MultiJITTest.cpp onChris Lattner2010-08-17
| | | | | | | cygwin when built with ENABLE_SHARED=1. Patch by NAKAMURA Takumi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111231 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark this variable as used.Chandler Carruth2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110667 91177308-0d34-0410-b5e6-96231b3b80d8
* remove code setting rw locks to PTHREAD_PROCESS_PRIVATE, whichChris Lattner2010-08-10
| | | | | | | is the default. Patch by NAKAMURA Takumi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110636 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unnecessary empty string literals.Dan Gohman2010-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110183 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an erase() method to llvm::ThreadLocal.Owen Anderson2010-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109686 91177308-0d34-0410-b5e6-96231b3b80d8
* Rather than using an ifdef on the target to zero out fields,Duncan Sands2010-07-14
| | | | | | | just use memset to zero the entire struct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108330 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some tab stops into spaces.Duncan Sands2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
* Path::isRootDirectory is unimplemented on Unix and not used,Chris Lattner2010-07-12
| | | | | | | remove it, fixing PR6909. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108125 91177308-0d34-0410-b5e6-96231b3b80d8
* improve Path::makeUnique when mkstemp/mktemp are not availableChris Lattner2010-07-12
| | | | | | | patch by Lasse Kärkkäinen in PR7404. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108110 91177308-0d34-0410-b5e6-96231b3b80d8
* add some triple for minix, patch by Kees van Reeuwijk from PR7582Chris Lattner2010-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107785 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid "variable 'bits' set but not used [-Wunused-but-set-variable]"Duncan Sands2010-06-10
| | | | | | | | warnings with gcc-4.6, by not setting bits when the result is not used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105790 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the handler work from SignalHandler into a helper function,Dan Gohman2010-05-27
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104896 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother clearing the Magic string when the magic numberDan Gohman2010-05-27
| | | | | | | can't be read, since it isn't cleared on other error paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104852 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother checking canRead() before calling getMagicNumber();Dan Gohman2010-05-27
| | | | | | | getMagicNumber() does its own error checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104851 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanupDaniel Dunbar2010-05-08
| | | | | | stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103333 91177308-0d34-0410-b5e6-96231b3b80d8
* This doesn't need SmallVector.h anymore.Dan Gohman2010-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101790 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this for std::vectors which don't have .data().Dan Gohman2010-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101785 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wcast-qual warnings.Dan Gohman2010-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101782 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 91528 and use a std::vector instead, fixing an abuse of std::string.Dan Gohman2010-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101781 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid temporary std::string in non posix_spawn path.Chris Lattner2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101723 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate temporary string.Benjamin Kramer2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101711 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly inherit the environment on darwin where environ is not available ↵Benjamin Kramer2010-04-18
| | | | | | for shared libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101710 91177308-0d34-0410-b5e6-96231b3b80d8
* This is horrible. Split the difference, and declare 'environ' on all non-DarwinNick Lewycky2010-04-18
| | | | | | | | platforms to unbreak the darwin and linux builds. The BSD folks should feel free to change the #if, if this breaks them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101703 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r101701, Darwin doesn't have 'environ'. Go figure.Nick Lewycky2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101702 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linux build. posix_spawn doesn't inherit the environment by default.Nick Lewycky2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101701 91177308-0d34-0410-b5e6-96231b3b80d8
* make Program::Execute use posix_spawn on systems that support it,Chris Lattner2010-04-18
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101693 91177308-0d34-0410-b5e6-96231b3b80d8
* unnest from namespace.Chris Lattner2010-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101691 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of namespace polution.Dan Gohman2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
* improve haiku portability, patch by Paul Davey.Chris Lattner2010-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100933 91177308-0d34-0410-b5e6-96231b3b80d8
* add minix support, patch by Kees van Reeuwijk! PR6797Chris Lattner2010-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8
* AddSignalHandler was not releasing the critical section on win32.Torok Edwin2010-03-31
| | | | | | | Patch from Gianluigi Tiesi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100003 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a grammaro.Dan Gohman2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99917 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly quote the quotes :) during cmdline construction on Windows.Anton Korobeynikov2010-03-28
| | | | | | | | | Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro got the bar value, not "bar". Patch by Alexander Esilevich! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99763 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a constructor implementation that isn't declaredChris Lattner2010-03-26
| | | | | | | | | in the header. How can both clang and gcc accept this? PR6703 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99658 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a false-positive memory leak in code using RemoveFileOnSignal(). BecauseJeffrey Yasskin2010-03-17
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98716 91177308-0d34-0410-b5e6-96231b3b80d8
* Tell Valgrind when we modify already-executed machine code so it knowsJeffrey Yasskin2010-03-15
| | | | | | | | | to re-instrument the code. We depend on the system valgrind.h to avoid adding a new license. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98529 91177308-0d34-0410-b5e6-96231b3b80d8
* don't forget to close a FD on an error condition, found byChris Lattner2010-03-14
| | | | | | | cppcheck, PR6617. Patch by Ettl Martin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98525 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove superfluous NULL assignmentKovarththanan Rajaratnam2010-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98350 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build.Ted Kremenek2010-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98250 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang bootstrap happier on OSX 10.5 by reducing the number of headersJeffrey Yasskin2010-03-11
| | | | | | | | | | included when using global symbols to ask the linker for the addresses of various functions. One of the symbols was actually getting declared by a header included in DynamicLibrary.cpp, which conflicted with the "extern void*" declaration in SearchForAddressOfSpecialSymbol(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98243 91177308-0d34-0410-b5e6-96231b3b80d8
* follow-on to PR6280Chris Lattner2010-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96172 91177308-0d34-0410-b5e6-96231b3b80d8
* improve support for minix, PR6280, patch byChris Lattner2010-02-12
| | | | | | | Kees van Reeuwijk! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95946 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94743 91177308-0d34-0410-b5e6-96231b3b80d8