Files
clang-p2996/lldb/test/API/lang/cpp/thread_local/main.cpp
Fred Riss 71db787c45 [lldb/testsuite] Rewrite TestThreadLocal.py
It was an inline test before. Clang stopped emitting line information
for the TLS initialization and the inline test didn't have a way to
break before it anymore.

This rewrites the test as a full-fldeged python test and improves the
checking of the error case to verify that the failure we are looking
for is related to the TLS setup not being complete.
2020-03-18 20:52:28 -07:00

12 lines
305 B
C++

int storage = 45;
thread_local int tl_global_int = 123;
thread_local int *tl_global_ptr = &storage;
int main(int argc, char **argv) {
thread_local int tl_local_int = 321;
thread_local int *tl_local_ptr = nullptr;
tl_local_ptr = &tl_local_int;
tl_local_int++;
return 0; // Set breakpoint here
}