[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)
commitfb3139ad9e812779e9ad24238b53bbffc6b7d8ba
tree9ed25a304fb80da3142aebbc4403dc4f85b1d799
parent9244d95fd88015602e79058baa7ce7f57718257e
[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.

llvm-svn: 227411
llvm/include/llvm/Support/Compiler.h
llvm/lib/Support/PrettyStackTrace.cpp