summaryrefslogtreecommitdiffstats
path: root/gcc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 8c01ca16907..060ecd11189 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -427,6 +427,17 @@ extern void tree_operand_check_failed PARAMS ((int, enum tree_code,
== TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
(EXP) = TREE_OPERAND (EXP, 0)
+/* Like STRIP_NOPS, but don't alter the TREE_TYPE main variant either. */
+
+#define STRIP_MAIN_TYPE_NOPS(EXP) \
+ while ((TREE_CODE (EXP) == NOP_EXPR \
+ || TREE_CODE (EXP) == CONVERT_EXPR \
+ || TREE_CODE (EXP) == NON_LVALUE_EXPR) \
+ && TREE_OPERAND (EXP, 0) != error_mark_node \
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (EXP)) \
+ == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
+ (EXP) = TREE_OPERAND (EXP, 0)
+
/* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */
#define STRIP_TYPE_NOPS(EXP) \
@@ -2955,6 +2966,7 @@ extern bool variably_modified_type_p PARAMS ((tree));
extern int tree_log2 PARAMS ((tree));
extern int tree_floor_log2 PARAMS ((tree));
extern int simple_cst_equal PARAMS ((tree, tree));
+extern unsigned int iterative_hash_expr PARAMS ((tree, unsigned int));
extern int compare_tree_int PARAMS ((tree,
unsigned HOST_WIDE_INT));
extern int type_list_equal PARAMS ((tree, tree));
OpenPOWER on IntegriCloud