From 8cc075c6a736fdde56ca2da03a868821695765f4 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 13 Sep 2026 23:33:14 +0200 Subject: Add threadvar section for thread-local variables --- include/elna/boot/ast.h | 3 +++ include/elna/boot/symbol.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/elna/boot/ast.h b/include/elna/boot/ast.h index 5d5bdce..ffc57de 100644 --- a/include/elna/boot/ast.h +++ b/include/elna/boot/ast.h @@ -606,6 +606,9 @@ namespace elna::boot type_expression& variable_type(); expression *initializer{ nullptr }; const bool is_extern{ false }; + + /// Whether the variable was declared in a \c threadvar section. + bool is_thread_local{ false }; }; /** diff --git a/include/elna/boot/symbol.h b/include/elna/boot/symbol.h index 1ca5deb..08292bc 100644 --- a/include/elna/boot/symbol.h +++ b/include/elna/boot/symbol.h @@ -487,6 +487,9 @@ namespace elna::boot /// its type's own alignment. std::optional alignment; + /// Whether the variable has thread storage duration. + bool is_thread_local{ false }; + /** * Constructs a variable symbol information. * -- cgit v1.2.3