summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ThreadLocal.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ThreadLocal: Move Unix-specific code out of Support/ThreadLocal.cppDavid Majnemer2014-12-151-45/+0
| | | | | | Just a cleanup, no functionality change is intended. llvm-svn: 224227
* ThreadLocal: Return a mutable pointer if templated with a non-const typeDavid Majnemer2014-12-151-2/+2
| | | | | | | It makes more sense for ThreadLocal<const T>::get to return a const T* and ThreadLocal<T>::get to return a T*. llvm-svn: 224225
* [C++11] Make use of 'nullptr' in the Support library.Craig Topper2014-04-071-2/+2
| | | | llvm-svn: 205697
* [C++11] Replace LLVM_STATIC_ASSERT with static_assert, we now haveChandler Carruth2014-03-021-2/+2
| | | | | | access to it on all host toolchains. llvm-svn: 202642
* Silence g++ 4.9 build issueAlp Toker2013-12-311-2/+3
| | | | | | | | | lib/Support/ThreadLocal.cpp:53:15: error: typedef 'SIZE_TOO_BIG' locally defined but not used [-Werror=unused-local-typedefs] typedef int SIZE_TOO_BIG[sizeof(pthread_key_t) <= sizeof(data) ? 1 : -1]; Done the C++11 way, switching on and using LLVM_STATIC_ASSERT() instead of LLVM_ATTRIBUTE_UNUSED. llvm-svn: 198255
* Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)Hans Wennborg2013-12-191-1/+1
| | | | | | | | | | | | | According to the docs, ThreadLocal<>::get() should return NULL if no object has been set. This patch makes that the case also for non-thread builds and adds a very basic unit test to check it. (This was causing PR18205 because PrettyStackTraceHead didn't get zero- initialized and we'd crash trying to read past the end of that list. We didn't notice this so much on Linux since we'd crash after printing all the entries, but on Mac we print into a SmallString, and would crash before printing that.) llvm-svn: 197718
* Fix ThreadLocalImpl::getInstance for --disable-threads.Argyrios Kyrtzidis2012-06-261-3/+5
| | | | | | PR13114. llvm-svn: 159210
* Fix building ThreadLocal.cpp with --disable-threads.Argyrios Kyrtzidis2012-06-131-2/+9
| | | | llvm-svn: 158405
* Satisfy C++ aliasing rules, per suggestion by Chandler.Argyrios Kyrtzidis2012-06-121-1/+1
| | | | llvm-svn: 158346
* For llvm::sys::ThreadLocalImpl instead of malloc'ing the platform-specificArgyrios Kyrtzidis2012-06-121-6/+5
| | | | | | | | | | | thread local data, embed them in the class using a uint64_t and make sure we get compiler errors if there's a platform where this is not big enough. This makes ThreadLocal more safe for using it in conjunction with CrashRecoveryContext. Related to crash in rdar://11434201. llvm-svn: 158342
* rename ENABLE_THREADS to LLVM_ENABLE_THREADSDylan Noblesmith2011-11-281-1/+1
| | | | | | | | | | | Now that it needs to be exported in a public header (Valgrind.h) it should be prefixed to avoid collision with other projects. Add it to llvm-config.h as well. This'll require regenerating the configure script after this commit, but I don't have the required autoconf version. llvm-svn: 145214
* Clean up a few references to System/. We still have docs/SystemLibrary.htmlDaniel Dunbar2011-10-111-1/+1
| | | | | | lying around... llvm-svn: 141703
* Merge System into Support.Michael J. Spencer2010-11-291-0/+84
llvm-svn: 120298
OpenPOWER on IntegriCloud