Commit 40a14772 by Tristan Gingold Committed by Arnaud Charlet

utils.c, [...]: Add support for pragma Thread_Local_Storage

2009-04-08  Tristan Gingold  <gingold@adacore.com>

	* gcc-interface/utils.c, gcc-interface/decl.c, gcc-interface/gigi.h:
	Add support for pragma Thread_Local_Storage

From-SVN: r145730
parent 46ff89f3
2009-04-08 Tristan Gingold <gingold@adacore.com>
* gcc-interface/utils.c, gcc-interface/decl.c, gcc-interface/gigi.h:
Add support for pragma Thread_Local_Storage
2009-04-08 Ed Schonberg <schonberg@adacore.com> 2009-04-08 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Back_End_Cannot_Inline): Do not mark a body as inlineable * inline.adb (Back_End_Cannot_Inline): Do not mark a body as inlineable
...@@ -5435,6 +5435,10 @@ prepend_attributes (Entity_Id gnat_entity, struct attrib ** attr_list) ...@@ -5435,6 +5435,10 @@ prepend_attributes (Entity_Id gnat_entity, struct attrib ** attr_list)
etype = ATTR_WEAK_EXTERNAL; etype = ATTR_WEAK_EXTERNAL;
break; break;
case Pragma_Thread_Local_Storage:
etype = ATTR_THREAD_LOCAL_STORAGE;
break;
default: default:
continue; continue;
} }
......
...@@ -345,6 +345,7 @@ enum attr_type ...@@ -345,6 +345,7 @@ enum attr_type
ATTR_LINK_SECTION, ATTR_LINK_SECTION,
ATTR_LINK_CONSTRUCTOR, ATTR_LINK_CONSTRUCTOR,
ATTR_LINK_DESTRUCTOR, ATTR_LINK_DESTRUCTOR,
ATTR_THREAD_LOCAL_STORAGE,
ATTR_WEAK_EXTERNAL ATTR_WEAK_EXTERNAL
}; };
......
...@@ -1631,6 +1631,14 @@ process_attributes (tree decl, struct attrib *attr_list) ...@@ -1631,6 +1631,14 @@ process_attributes (tree decl, struct attrib *attr_list)
DECL_STATIC_DESTRUCTOR (decl) = 1; DECL_STATIC_DESTRUCTOR (decl) = 1;
TREE_USED (decl) = 1; TREE_USED (decl) = 1;
break; break;
case ATTR_THREAD_LOCAL_STORAGE:
if (targetm.have_tls)
DECL_TLS_MODEL (decl) = decl_default_tls_model (decl);
else
post_error ("thread-local storage not supported for this target",
attr_list->error_point);
break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment