llvm-6502/lib/Support/Unix
Hans Wennborg 837d6ed3ea Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197718 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 20:32:44 +00:00
..
Host.inc
Memory.inc
Mutex.inc
Path.inc Build fix for Android NDK which has neither futimes nor futimens 2013-12-11 15:42:33 +00:00
Process.inc Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
Program.inc Fix build on Solaris 11. 2013-10-08 16:12:58 +00:00
README.txt
RWMutex.inc
Signals.inc
system_error.inc
ThreadLocal.inc Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205) 2013-12-19 20:32:44 +00:00
TimeValue.inc
Unix.h Fix build on Solaris 11. 2013-10-08 16:12:58 +00:00
Watchdog.inc

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.