[LPM] Clean up the use of TLS in pretty stack trace and disable it
authorChandler Carruth <chandlerc@gmail.com>
Thu, 29 Jan 2015 01:23:04 +0000 (01:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 29 Jan 2015 01:23:04 +0000 (01:23 +0000)
commit54e0791182acd3ded2b3de653e404b554125c7fe
treefd770aff4e029f882a6852924e894ccd54cab1b2
parent866fe5889e078b5f7b6a724cf3f822adc39b3ae5
[LPM] Clean up the use of TLS in pretty stack trace and disable it
entirely when threads are not enabled. This should allow anyone who
needs to bootstrap or cope with a host loader without TLS support to
limp along without threading support.

There is still some bug in the PPC TLS stuff that is not worked around.
I'm getting access to a machine to reproduce and debug this further.
There is some chance that I'll have to add a terrible workaround for
PPC.

There is also some problem with iOS, but I have no ability to really
evaluate what the issue is there. I'm leaving it to folks maintaining
that platform to suggest a path forward -- personally I don't see any
useful path forward that supports threading in LLVM but does so without
support for *very basic* TLS. Note that we don't need more than some
pointers, and we don't need constructors, destructors, or any of the
other fanciness which remains widely unimplemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227411 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Compiler.h
lib/Support/PrettyStackTrace.cpp