summaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-28 15:01:08 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-28 15:01:08 +0000
commitdc6fafc62cf3863e622effaa3ec828cbfc830679 (patch)
treec8b542c52ebd389d49caa0af70a3ae7838edfcb2 /gcc/tree-flow-inline.h
parent564714940bf7b0069ab29c651cb482c16d8d49eb (diff)
downloadgcc-dc6fafc62cf3863e622effaa3ec828cbfc830679.tar.gz
2007-03-28 Richard Guenther <rguenther@suse.de>
* tree.c (is_global_var): Move ... * tree-flow-inline.h (is_global_var): ... here. * tree.h (is_global_var): Remove declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123303 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 8d1072aaf4d..f7728e43ed8 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -718,6 +718,17 @@ is_label_stmt (tree t)
return false;
}
+/* Return true if T (assumed to be a DECL) is a global variable. */
+
+static inline bool
+is_global_var (tree t)
+{
+ if (MTAG_P (t))
+ return (TREE_STATIC (t) || MTAG_GLOBAL (t));
+ else
+ return (TREE_STATIC (t) || DECL_EXTERNAL (t));
+}
+
/* PHI nodes should contain only ssa_names and invariants. A test
for ssa_name is definitely simpler; don't let invalid contents
slip in in the meantime. */