summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the Win32 implementation, since it doesn't compile pre-Vista.Owen Anderson2009-06-161-12/+7
| | | | llvm-svn: 73550
* Fix/cleanup trailing newlines.Owen Anderson2009-06-161-1/+0
| | | | llvm-svn: 73546
* Add a portable wrapper for reader-writer locks.Owen Anderson2009-06-164-1/+268
| | | | llvm-svn: 73545
* glibc has two versions of strerror_r, a standards compliant one and a GNUDan Gohman2009-06-151-1/+8
| | | | | | | | | | | | | | specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always defines _GNU_SOURCE on linux platforms because glibc's headers won't compile in C++ mode without it. The GNU strerror_r doesn't always modify the buffer which causes empty error messages on linux. This patch changes MakeErrMsg to use the return value of strerror_r to get the string instead of assuming the buffer will be modified, on GLIBC. Patch by Benjamin Kramer! llvm-svn: 73396
* "This patch implements the method with the GetModuleFileName function for ↵Chris Lattner2009-06-151-1/+3
| | | | | | | | windows." Patch by Benjamin Kramer! llvm-svn: 73379
* add a new static method to portably determine whether a patch isChris Lattner2009-06-152-0/+22
| | | | | | absolute or not, based on a patch by Gregory Curfman! llvm-svn: 73368
* Fix comments.Torok Edwin2009-06-041-1/+2
| | | | llvm-svn: 72858
* Add support for outputting ANSI colors to raw_fd_ostream.Torok Edwin2009-06-042-0/+125
| | | | llvm-svn: 72854
* At a newline at the end of this file.Duncan Sands2009-06-031-1/+1
| | | | llvm-svn: 72767
* Undef MemoryFence when compiling on MSVC.Owen Anderson2009-06-021-0/+1
| | | | llvm-svn: 72732
* Untabification.Bill Wendling2009-05-301-42/+41
| | | | llvm-svn: 72604
* Work around a page size issue on Cygwin.Jay Foad2009-05-231-1/+6
| | | | llvm-svn: 72332
* Add Atomic.cpp to the CMake build system.Owen Anderson2009-05-211-0/+1
| | | | llvm-svn: 72202
* Tabs, be gone!Owen Anderson2009-05-201-3/+3
| | | | llvm-svn: 72180
* I just fail today.Owen Anderson2009-05-201-3/+3
| | | | | | Hopefully this fixes the last build errors on systems with GCC < 4.1. llvm-svn: 72179
* Copy-and-paste-o.Owen Anderson2009-05-201-1/+1
| | | | llvm-svn: 72177
* Move atomic operations' definitions out of line. While this seems kind of ↵Owen Anderson2009-05-201-0/+52
| | | | | | | | silly, all kinds of problems caused by including windows.h and/or config.h in an LLVM header. llvm-svn: 72174
* termios.h contains the winsize structure we need to determine theDouglas Gregor2009-05-181-1/+4
| | | | | | | width of a terminal. Don't try to get the width of a terminal if we don't have this header. llvm-svn: 72018
* Add terminal width detection to llvm::sys::Process. This is needed toDouglas Gregor2009-05-112-0/+53
| | | | | | fix Clang PRs 4148 and 4183. llvm-svn: 71448
* 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. llvm-svn: 70299
* Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:Torok Edwin2009-04-251-1/+1
| | | | | | | | | | | | Path.cpp:59: warning: case label value exceeds maximum value for type magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde). When magic[0] was 0xde, the switch has taken the default branch instead of case 0xde branch. Apparently this was the behaviour with older versions of gcc too, but not with g++. Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed range. llvm-svn: 70038
* Silence warnings.Anton Korobeynikov2009-04-211-5/+5
| | | | | | Patch by Jay Foad! llvm-svn: 69679
* Drop obsolete reference to __eprintf.Anton Korobeynikov2009-04-211-2/+0
| | | | | | Patch by Jay Foad! llvm-svn: 69678
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-204-7/+10
| | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). llvm-svn: 69626
* 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. llvm-svn: 69082
* Delete trailing whitespace.Mikhail Glushenkov2009-04-141-13/+13
| | | | llvm-svn: 69081
* fix PR3965:SIGINT handler not restored after calling ParseAST(),Chris Lattner2009-04-121-1/+2
| | | | | | patch by Alexei Svitkine! llvm-svn: 68929
* Add sys::Path::makeAbsolute().Daniel Dunbar2009-04-091-0/+12
| | | | llvm-svn: 68663
* hopefully fix an apparent build error on windows.Chris Lattner2009-04-011-0/+1
| | | | llvm-svn: 68175
* Add llvm::sys::getHostTriple and removeDaniel Dunbar2009-03-312-26/+28
| | | | | | | | | | | 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. llvm-svn: 68118
* fix a bug Alexei Svitkine pointed out.Chris Lattner2009-03-231-2/+2
| | | | llvm-svn: 67510
* When we restore signal handlers, restore them back to what theyChris Lattner2009-03-231-8/+30
| | | | | | | were when we came around, not to their default handler. This should fix PR3848 llvm-svn: 67509
* factorize signal registration, part of PR3848.Chris Lattner2009-03-231-10/+23
| | | | llvm-svn: 67508
* Fix the Win32 VS2008 build:Sebastian Redl2009-03-192-11/+13
| | | | | | | | | | - Make type declarations match the struct/class keyword of the definition. - Move AddSignalHandler into the namespace where it belongs. - Correctly call functions from template base. - Some other small changes. With this patch, LLVM and Clang should build properly and with far less noise under VS2008. llvm-svn: 67347
* add some explicit llvm:: qualifiers to the unix side, fix problems on the ↵Chris Lattner2009-03-082-6/+7
| | | | | | windows side. llvm-svn: 66386
* When a crash signal is delivered do two things: remove all of ourChris Lattner2009-03-071-5/+14
| | | | | | | | | signal handlers to prevent reentrance on unrelated things (a sigabort where the handle bus errors) also, clear the signal mask so that the signal doesn't infinitely reissue. This fixes rdar://6654827 - Crash causes clang to loop llvm-svn: 66330
* move some code to gracefully handle the case when a handler crashes.Chris Lattner2009-03-051-4/+6
| | | | llvm-svn: 66171
* Add a new 'AddSignalHandler' function to Signals.h that allowsChris Lattner2009-03-042-135/+83
| | | | | | | | | | | | | arbitrary functions to be run when a crash happens. Delete RemoveDirectoryOnSignal as it is dead and has never had clients. Change PrintStackTraceOnErrorSignal to be implemented in terms of AddSignalHandler. I updated the Win32 versions of these APIs, but can't test them. If there are any problems, I'd be happy to fix them as well. llvm-svn: 66072
* Fix main executable path name resolution on FreeBSD, patch by Chris Lattner2009-03-021-1/+60
| | | | | | Ed Schouten! llvm-svn: 65882
* If an executable is run through a symlink, dladdr will return theChris Lattner2009-02-191-3/+8
| | | | | | | | symlink. We really want the ultimate executable being run, not the symlink. This lets clang find its headers when invoked through a symlink. rdar://6602012 llvm-svn: 65017
* Fix warning on gcc 4.3.Mikhail Glushenkov2009-02-151-1/+4
| | | | | | "system() declared with attribute warn_unused_result." llvm-svn: 64574
* Whitespace fixes.Mikhail Glushenkov2009-02-151-58/+58
| | | | llvm-svn: 64573
* Unbreak the build on win32.Cedric Venet2009-02-141-1/+1
| | | | | | | | | | Cleanup some warning. Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync. Only tested with VS2008. hope it does not break anything. feel free to revert. llvm-svn: 64554
* Fix MingW build, patch by Kenneth Boyd!Julien Lerouge2009-02-121-1/+4
| | | | llvm-svn: 64366
* Use const, to support platforms where strrchr returns a const char *.Dan Gohman2009-02-101-2/+2
| | | | | | This fixes PR3535. llvm-svn: 64224
* Add a Sleep() function.Mikhail Glushenkov2009-02-082-0/+8
| | | | llvm-svn: 64101
* Add Emacs hints to Alarm.inc.Mikhail Glushenkov2009-02-083-8/+8
| | | | | | Also removes some trailing whitespace and fixes one 80-column violation. llvm-svn: 64094
* Fix windows build, patch by Marius Wachtler!Chris Lattner2009-01-291-2/+2
| | | | llvm-svn: 63325
* Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!Chris Lattner2009-01-291-4/+7
| | | | llvm-svn: 63269
* rename methods in System/Host to be more consistent.Chris Lattner2009-01-222-4/+4
| | | | llvm-svn: 62776
OpenPOWER on IntegriCloud