File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ LEVEL = ../../../make
2+ CXX_SOURCES := main.cpp
3+ include $(LEVEL ) /Makefile.rules
Original file line number Diff line number Diff line change 1+ from lldbsuite .test import lldbinline
2+ from lldbsuite .test import decorators
3+
4+ lldbinline .MakeInlineTest (__file__ , globals (),
5+ lldbinline .expectedFailureAll (oslist = ["windows" , "linux" ]))
Original file line number Diff line number Diff line change 1+ int storage = 45 ;
2+ thread_local int tl_global_int = 123 ;
3+ thread_local int *tl_global_ptr = &storage;
4+
5+ int main (int argc, char **argv) {
6+ // % self.expect("expr tl_local_int", error=True, substrs=["couldn't get the value of variable tl_local_int"])
7+ // % self.expect("expr *tl_local_ptr", error=True, substrs=["couldn't get the value of variable tl_local_ptr"])
8+ thread_local int tl_local_int = 321 ;
9+ thread_local int *tl_local_ptr = nullptr ;
10+ tl_local_ptr = &tl_local_int;
11+ tl_local_int++;
12+ // % self.expect("expr tl_local_int + 1", substrs=["int", "= 323"])
13+ // % self.expect("expr *tl_local_ptr + 2", substrs=["int", "= 324"])
14+ // % self.expect("expr tl_global_int", substrs=["int", "= 123"])
15+ // % self.expect("expr *tl_global_ptr", substrs=["int", "= 45"])
16+ return 0 ;
17+ }
You can’t perform that action at this time.
0 commit comments