summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beutil.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2014-01-08 09:01:17 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2014-01-27 14:59:22 +0100
commitba96d25a88c5d714c0dc4a56aa0c07307263c9a9 (patch)
treed9d0e6095217ba4c775e938b8b95536caf6188c9 /ir/be/beutil.h
parent7d128813495a2caa80c202ad125d9050d419a665 (diff)
Add and use the helper function is_tls_entity().
Diffstat (limited to 'ir/be/beutil.h')
-rw-r--r--ir/be/beutil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ir/be/beutil.h b/ir/be/beutil.h
index 17f5f4e..9d55d91 100644
--- a/ir/be/beutil.h
+++ b/ir/be/beutil.h
@@ -11,7 +11,9 @@
#ifndef FIRM_BE_BEUTIL_H
#define FIRM_BE_BEUTIL_H
+#include "entity_t.h"
#include "firm_types.h"
+#include "irprog_t.h"
/**
* Convenient block getter.
@@ -54,4 +56,9 @@ ir_node **be_get_cfgpostorder(ir_graph *irg);
*/
ir_node *get_first_block_succ(const ir_node *block);
+static inline bool is_tls_entity(ir_entity *const ent)
+{
+ return get_entity_owner(ent) == get_tls_type();
+}
+
#endif