aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-02-24 16:33:06 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-02-24 16:33:06 +0100
commitf64f6374c4b9db9f1111f272d842a625f0507ae6 (patch)
tree2d37f9896459d286cba7660f4d5d7504deb636c7 /cfrontend
parent26d2601818c387a540a7d89aec1363981f601b7e (diff)
downloadcompcert-kvx-f64f6374c4b9db9f1111f272d842a625f0507ae6.tar.gz
compcert-kvx-f64f6374c4b9db9f1111f272d842a625f0507ae6.zip
it now works, no more ugly hack to access thread local data
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/C2C.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index 015a2eb6..d03392b1 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -59,6 +59,15 @@ let atom_is_extern a =
with Not_found ->
false
+let atom_is_thread_local a =
+ try
+ match (Hashtbl.find decl_atom a).a_storage with
+ | C.Storage_thread_local_extern| C.Storage_thread_local_static
+ | C.Storage_thread_local -> true
+ | _ -> false
+ with Not_found ->
+ false
+
let atom_alignof a =
try
(Hashtbl.find decl_atom a).a_alignment