From f64f6374c4b9db9f1111f272d842a625f0507ae6 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 24 Feb 2020 16:33:06 +0100 Subject: it now works, no more ugly hack to access thread local data --- cfrontend/C2C.ml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cfrontend/C2C.ml') 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 -- cgit