Don't require ThreadState to be contained within tls on all platforms
authorFrancis Ricci <francisjricci@gmail.com>
Thu, 25 May 2017 17:41:10 +0000 (17:41 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Thu, 25 May 2017 17:41:10 +0000 (17:41 +0000)
commit75ca300f2b6a8d32b924a52a7d5640af9e2d64c3
treeaf49197b36b0e9463e1584e3dcaade54239e81a1
parent14205b4a76283d7b0cdeb940b9e40b365a5fbbe9
Don't require ThreadState to be contained within tls on all platforms

The existing implementation ran CHECKs to assert that the thread state
was stored inside the tls. However, the mac implementation of tsan doesn't
store the thread state in tls, so these checks fail once darwin tls support
is added to the sanitizers. Only run these checks on platforms where
the thread state is expected to be contained in the tls.

llvm-svn: 303886
compiler-rt/lib/tsan/rtl/tsan_platform.h
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc
compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc