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
This commit is contained in:
parent
46ff89f320
commit
40a14772d9
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
* 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)
|
||||
etype = ATTR_WEAK_EXTERNAL;
|
||||
break;
|
||||
|
||||
case Pragma_Thread_Local_Storage:
|
||||
etype = ATTR_THREAD_LOCAL_STORAGE;
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
@ -345,6 +345,7 @@ enum attr_type
|
||||
ATTR_LINK_SECTION,
|
||||
ATTR_LINK_CONSTRUCTOR,
|
||||
ATTR_LINK_DESTRUCTOR,
|
||||
ATTR_THREAD_LOCAL_STORAGE,
|
||||
ATTR_WEAK_EXTERNAL
|
||||
};
|
||||
|
||||
|
@ -1631,6 +1631,14 @@ process_attributes (tree decl, struct attrib *attr_list)
|
||||
DECL_STATIC_DESTRUCTOR (decl) = 1;
|
||||
TREE_USED (decl) = 1;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user