summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-30 12:17:52 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-30 12:17:52 +0000
commit1b53eb2049bbdd60579efc45d4116c06b73e05c9 (patch)
tree816c741b3c00522d35a8c6d2c7612f26999ef518 /gcc/tree.c
parentb06d19340e790498e452b6d88bf42c7d22423c46 (diff)
downloadgcc-1b53eb2049bbdd60579efc45d4116c06b73e05c9.tar.gz
* coretypes.h (tls_model): Add TLS_MODEL_NONE as 0.
* tree.h (struct tree_decl): New field `tls_model'. (DECL_TLS_MODEL): New. (DECL_THREAD_LOCAL_P): Rename from DECL_THREAD_LOCAL, make it a predicate. * rtl.h (decl_default_tls_model): Add prototype for it. * varasm.c (decl_tls_model): Rewritten and renamed to ... (decl_default_tls_model): ... this. (default_encode_section_info): Use DECL_TLS_MODEL instead of decl_tls_model. (assemble_variable): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. (default_section_type_flags_1): Likewise. (categorize_decl_for_section): Likewise. * tree.c (staticp): Likewise. (recompute_tree_invarant_for_addr_expr): Likewise. * drawf2out (loc_descriptor_from_tree_1): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. with DECL_THREAD_LOCAL_P. (start_decl): Likewise. * print-tree.c (print_node): Likewise. Print the TLS model. (grokdeclarator): Set the default DECL_TLS_MODEL here. * c-common.c (handle_tls_model_attribute): Rewrite to set the TLS model up based on the attribute. Never add the attribute to the decl's attributes list. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. cp/ * decl.c (start_decl): Replace DECL_THREAD_LOCAL with DECL_THREAD_LOCAL_P. (cp_finish_decl): Likewise. (grokvardecl): Set the default DECL_TLS_MODEL here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101465 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 0088a9b2216..9a747ac5c36 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1652,7 +1652,7 @@ staticp (tree arg)
case VAR_DECL:
return ((TREE_STATIC (arg) || DECL_EXTERNAL (arg))
- && ! DECL_THREAD_LOCAL (arg)
+ && ! DECL_THREAD_LOCAL_P (arg)
&& ! DECL_NON_ADDR_CONST_P (arg)
? arg : NULL);
@@ -2480,7 +2480,8 @@ do { tree _node = (NODE); \
;
else if (decl_function_context (node) == current_function_decl
/* Addresses of thread-local variables are invariant. */
- || (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL (node)))
+ || (TREE_CODE (node) == VAR_DECL
+ && DECL_THREAD_LOCAL_P (node)))
tc = false;
else
ti = tc = false;