aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chkp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-chkp.c')
-rw-r--r--gcc/tree-chkp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
index f39c292..2769682 100644
--- a/gcc/tree-chkp.c
+++ b/gcc/tree-chkp.c
@@ -1002,7 +1002,7 @@ chkp_register_var_initializer (tree var)
|| DECL_INITIAL (var) == error_mark_node)
return false;
- gcc_assert (TREE_CODE (var) == VAR_DECL);
+ gcc_assert (VAR_P (var));
gcc_assert (DECL_INITIAL (var));
if (TREE_STATIC (var)
@@ -2936,7 +2936,7 @@ chkp_make_static_bounds (tree obj)
chkp_static_var_bounds map. It allows to
avoid duplicating bound vars for decls
sharing assembler name. */
- if (TREE_CODE (obj) == VAR_DECL)
+ if (VAR_P (obj))
{
tree name = DECL_ASSEMBLER_NAME (obj);
slot = chkp_static_var_bounds->get (name);
@@ -2952,7 +2952,7 @@ chkp_make_static_bounds (tree obj)
}
/* Build decl for bounds var. */
- if (TREE_CODE (obj) == VAR_DECL)
+ if (VAR_P (obj))
{
if (DECL_IGNORED_P (obj))
{
@@ -3014,7 +3014,7 @@ chkp_make_static_bounds (tree obj)
if (!chkp_static_var_bounds)
chkp_static_var_bounds = new hash_map<tree, tree>;
- if (TREE_CODE (obj) == VAR_DECL)
+ if (VAR_P (obj))
{
tree name = DECL_ASSEMBLER_NAME (obj);
chkp_static_var_bounds->put (name, bnd_var);
@@ -3117,7 +3117,7 @@ chkp_get_bounds_for_decl_addr (tree decl)
{
tree bounds;
- gcc_assert (TREE_CODE (decl) == VAR_DECL
+ gcc_assert (VAR_P (decl)
|| TREE_CODE (decl) == PARM_DECL
|| TREE_CODE (decl) == RESULT_DECL);
@@ -3144,7 +3144,7 @@ chkp_get_bounds_for_decl_addr (tree decl)
return chkp_get_zero_bounds ();
if (flag_chkp_use_static_bounds
- && TREE_CODE (decl) == VAR_DECL
+ && VAR_P (decl)
&& (TREE_STATIC (decl)
|| DECL_EXTERNAL (decl)
|| TREE_PUBLIC (decl))
@@ -3164,7 +3164,7 @@ chkp_get_bounds_for_decl_addr (tree decl)
|| DECL_EXTERNAL (decl)
|| TREE_PUBLIC (decl))))
{
- gcc_assert (TREE_CODE (decl) == VAR_DECL);
+ gcc_assert (VAR_P (decl));
bounds = chkp_generate_extern_var_bounds (decl);
}
else
@@ -3399,7 +3399,7 @@ chkp_parse_array_and_component_ref (tree node, tree *ptr,
}
else
{
- gcc_assert (TREE_CODE (var) == VAR_DECL
+ gcc_assert (VAR_P (var)
|| TREE_CODE (var) == PARM_DECL
|| TREE_CODE (var) == RESULT_DECL
|| TREE_CODE (var) == STRING_CST
@@ -3562,7 +3562,7 @@ chkp_find_bounds_1 (tree ptr, tree ptr_src, gimple_stmt_iterator *iter)
case MEM_REF:
case VAR_DECL:
if (BOUNDED_P (ptr_src))
- if (TREE_CODE (ptr) == VAR_DECL && DECL_REGISTER (ptr))
+ if (VAR_P (ptr) && DECL_REGISTER (ptr))
bounds = chkp_get_zero_bounds ();
else
{
@@ -3581,7 +3581,7 @@ chkp_find_bounds_1 (tree ptr, tree ptr_src, gimple_stmt_iterator *iter)
|| TREE_CODE (addr) == TARGET_MEM_REF)
{
if (BOUNDED_P (ptr_src))
- if (TREE_CODE (ptr) == VAR_DECL && DECL_REGISTER (ptr))
+ if (VAR_P (ptr) && DECL_REGISTER (ptr))
bounds = chkp_get_zero_bounds ();
else
{