llvm-6502/unittests/Support/CMakeLists.txt
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

42 lines
785 B
CMake

set(LLVM_LINK_COMPONENTS
Support
Core
)
add_llvm_unittest(SupportTests
AlignOfTest.cpp
AllocatorTest.cpp
ArrayRecyclerTest.cpp
BlockFrequencyTest.cpp
Casting.cpp
CommandLineTest.cpp
CompressionTest.cpp
ConstantRangeTest.cpp
ConvertUTFTest.cpp
DataExtractorTest.cpp
EndianTest.cpp
ErrorOrTest.cpp
FileOutputBufferTest.cpp
LeakDetectorTest.cpp
LockFileManagerTest.cpp
ManagedStatic.cpp
MathExtrasTest.cpp
MD5Test.cpp
MemoryBufferTest.cpp
MemoryTest.cpp
Path.cpp
ProcessTest.cpp
ProgramTest.cpp
RegexTest.cpp
SourceMgrTest.cpp
SwapByteOrderTest.cpp
ThreadLocalTest.cpp
TimeValueTest.cpp
UnicodeTest.cpp
ValueHandleTest.cpp
YAMLIOTest.cpp
YAMLParserTest.cpp
formatted_raw_ostream_test.cpp
raw_ostream_test.cpp
)