diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-04-08 13:46:35 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-08 15:46:35 +0200 |
commit | 40a14772d9e3ac71989aa3c8638d0fd40ed4ae9a (patch) | |
tree | 74f3338c6ac569b306873041622adb9df402a60d /gcc/ada | |
parent | 46ff89f320ff47227c77ce8cc749280a862f114c (diff) | |
download | gcc-40a14772d9e3ac71989aa3c8638d0fd40ed4ae9a.zip gcc-40a14772d9e3ac71989aa3c8638d0fd40ed4ae9a.tar.gz gcc-40a14772d9e3ac71989aa3c8638d0fd40ed4ae9a.tar.bz2 |
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
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 1 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 8 |
4 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0231903..c73aa0a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 5984027..291bc2b 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -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; } diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index ffd1767..42b5d17 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -345,6 +345,7 @@ enum attr_type ATTR_LINK_SECTION, ATTR_LINK_CONSTRUCTOR, ATTR_LINK_DESTRUCTOR, + ATTR_THREAD_LOCAL_STORAGE, ATTR_WEAK_EXTERNAL }; diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 78080b1..62ffb1b 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -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; } } |