1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

550 Commits

Author SHA1 Message Date
Ted Kremenek
1ebb7e72fa Lexically order files in CMakeLists.txt files.
llvm-svn: 75831
2009-07-15 21:08:16 +00:00
Daniel Dunbar
4aa12d4330 Use llvm_report_error, not llvm_unreachable.
llvm-svn: 75429
2009-07-12 21:01:49 +00:00
Daniel Dunbar
995f9a8a15 Improve sys::Path::makeAbsolute on Win32.
- Patch by Viktor Kutuzov!

 - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths.

llvm-svn: 75424
2009-07-12 20:23:56 +00:00
Chris Lattner
cf99e77cc3 "UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject paths with such characters in them. The attached patch removes the check from Path::isValid()."
patch by Benjamin Kramer!

llvm-svn: 75421
2009-07-12 19:01:16 +00:00
Chris Lattner
99ea095329 eraseFromDisk no longer throws.
llvm-svn: 75139
2009-07-09 16:17:28 +00:00
David Greene
87dbe0a3b5 Add an ExecuteNoWait interface to support asynchronous process spawning.
llvm-svn: 75055
2009-07-08 21:46:40 +00:00
Chris Lattner
54e86ad77c remove two methods that no longer exist.
llvm-svn: 74982
2009-07-08 01:07:39 +00:00
Chris Lattner
d28d16bc57 more getting windows to build.
llvm-svn: 74981
2009-07-08 00:52:12 +00:00
Chris Lattner
00c23b1d9e hopefully fix the build on windows.
llvm-svn: 74977
2009-07-08 00:29:32 +00:00
Chris Lattner
ccaba64332 Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.

llvm-svn: 74927
2009-07-07 18:17:07 +00:00
Chris Lattner
b11fca33f8 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
llvm-svn: 74926
2009-07-07 18:01:58 +00:00
Chris Lattner
5d45e95584 we don't use libtool anymore, update comments.
llvm-svn: 74924
2009-07-07 17:50:11 +00:00
Owen Anderson
70fe80ea5e No need to double-include config.h
llvm-svn: 74854
2009-07-06 21:24:37 +00:00
Owen Anderson
8c9cecfed5 We need to include config.h to get the proper setting to LLVM_MULTITHREADED.
Patch by Xerxes Ranby.

llvm-svn: 74846
2009-07-06 18:50:47 +00:00
Chris Lattner
dc35f5434f improve portability to windows, patch by Xerces Ranby!
llvm-svn: 74835
2009-07-06 17:24:48 +00:00
Jeffrey Yasskin
b21c8333a6 Oops, I #included errno.h from inside the llvm::sys namespace.
llvm-svn: 74834
2009-07-06 16:50:27 +00:00
Duncan Sands
961ee9b54e Fix windows build, patch by Howard Su.
llvm-svn: 74697
2009-07-02 12:09:50 +00:00
Jeffrey Yasskin
29ea777c1e Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
250c7e1a54 Try again at making this work on OpenBSD.
llvm-svn: 74612
2009-07-01 16:19:23 +00:00
Owen Anderson
a006b0212a Fix the build on OpenBSD.
llvm-svn: 74597
2009-07-01 06:53:29 +00:00
Oscar Fuentes
88c3197f7c Fixed assert that checks return value of TlsSetValue.
See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx

Patch by Olaf Krzikalla!

llvm-svn: 74526
2009-06-30 14:12:28 +00:00
Owen Anderson
77f965d8b2 Fix compilation without pthreads.
Patch by Xerxes Ranby.

llvm-svn: 74283
2009-06-26 08:48:03 +00:00
Daniel Dunbar
0d9b275e55 Fix unused variable warnings.
llvm-svn: 74250
2009-06-26 01:34:35 +00:00
Owen Anderson
ba05ead9db Fix error in the Win32 implementation pointed out by Howard Su.
llvm-svn: 74248
2009-06-26 00:51:20 +00:00
Owen Anderson
3a892a63b7 Add support for const thread locals.
llvm-svn: 74226
2009-06-25 23:31:18 +00:00
Owen Anderson
8d5f9675c7 Fix typo in assertion.
llvm-svn: 74225
2009-06-25 23:28:28 +00:00
Owen Anderson
59ffd85020 Add a configure test for pthread_getspecific, and use it when building ThreadLocal.
llvm-svn: 74222
2009-06-25 23:10:26 +00:00
Owen Anderson
aef431f9cb Update cmake build files.
llvm-svn: 74210
2009-06-25 21:58:34 +00:00
Owen Anderson
e716e57779 Add a class for supporting platform independent thread-local storage.
Windows people, please double-check/patch this.

llvm-svn: 74209
2009-06-25 21:58:01 +00:00
Owen Anderson
d1598408ce Guard dynamic library loading.
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?

llvm-svn: 74188
2009-06-25 18:12:44 +00:00
Owen Anderson
5bda03a404 Add atomic multiply and divide operations, built on top of CompareAndSwap.
llvm-svn: 74004
2009-06-23 21:19:04 +00:00
Owen Anderson
c11dfb46c1 Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.

llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Owen Anderson
c2d02066d0 Atomic ops that do arithmetic use signed arithmetic.
llvm-svn: 73980
2009-06-23 18:30:27 +00:00
Owen Anderson
1bea9b9158 Label the existing atomic functions as 32-bit specific, and add a 64-bit one that will be useful in
the near future.

llvm-svn: 73971
2009-06-23 18:01:04 +00:00
Owen Anderson
e0ff9fb130 Add an atomic add operation.
llvm-svn: 73964
2009-06-23 17:39:31 +00:00
Owen Anderson
c1a4bbe1c8 Workaround for an... interesting bug in Darwin's pthread_rwlock_init.
llvm-svn: 73806
2009-06-20 00:32:27 +00:00
Owen Anderson
47968a6dec Fix bad paste-o in the MSVC atomics.
Patch by Иван Сорокин.

llvm-svn: 73779
2009-06-19 18:37:50 +00:00
Owen Anderson
4760da0a7a Give RWMutex the SmartRWMutex treatment too.
llvm-svn: 73710
2009-06-18 18:26:15 +00:00
Owen Anderson
9aaa6b8958 Insert a SmartMutex templated class into the class hierarchy, which takes a 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.

llvm-svn: 73709
2009-06-18 17:53:17 +00:00
Ted Kremenek
e88e953645 Update CMake files to account for new location of Threading.cpp.
llvm-svn: 73708
2009-06-18 17:47:09 +00:00
Owen Anderson
a59f91c08d Move Threading.[h|cpp] from Support to System.
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Owen Anderson
f71490c586 Fix build when disable thread support.
Patch by Howard Su.

llvm-svn: 73680
2009-06-18 04:44:46 +00:00
Douglas Gregor
b1764a0bef Add RWMutex.cpp to the CMake makefiles
llvm-svn: 73615
2009-06-17 17:01:30 +00:00
Owen Anderson
c40f3f2752 Improve the Win32 reader-writer lock implementation by making it just a normal
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.

llvm-svn: 73607
2009-06-17 09:10:42 +00:00
Owen Anderson
3637fc65bd Use atomic increment/decrement for reference counting of Type's.
llvm-svn: 73588
2009-06-17 00:28:49 +00:00
Owen Anderson
430f18d2db Add an atomic increment and decrement implementation, which will be used for
thread-safe reference counting.

llvm-svn: 73587
2009-06-17 00:13:00 +00:00
Owen Anderson
aaf83d86b8 Accidentally broke this file.
llvm-svn: 73552
2009-06-16 20:57:51 +00:00
Owen Anderson
208c38b522 Remove the Win32 implementation, since it doesn't compile pre-Vista.
llvm-svn: 73550
2009-06-16 20:49:20 +00:00
Owen Anderson
30a1b2528a Fix/cleanup trailing newlines.
llvm-svn: 73546
2009-06-16 20:23:05 +00:00
Owen Anderson
48d53f2c53 Add a portable wrapper for reader-writer locks.
llvm-svn: 73545
2009-06-16 20:19:28 +00:00