diff options
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -131,6 +131,12 @@ as_internal_fn (combined_fn code) #define CONSTANT_CLASS_P(NODE)\ (TREE_CODE_CLASS (TREE_CODE (NODE)) == tcc_constant) +/* Nonzero if NODE represents a constant, or is a location wrapper + around such a node. */ + +#define CONSTANT_CLASS_OR_WRAPPER_P(NODE)\ + (CONSTANT_CLASS_P (tree_strip_any_location_wrapper (NODE))) + /* Nonzero if NODE represents a type. */ #define TYPE_P(NODE)\ @@ -1175,6 +1181,19 @@ extern void protected_set_expr_location (tree, location_t); extern tree maybe_wrap_with_location (tree, location_t); +extern int suppress_location_wrappers; + +/* A class for suppressing the creation of location wrappers. + Location wrappers will not be created during the lifetime + of an instance of this class. */ + +class auto_suppress_location_wrappers +{ + public: + auto_suppress_location_wrappers () { ++suppress_location_wrappers; } + ~auto_suppress_location_wrappers () { --suppress_location_wrappers; } +}; + /* In a TARGET_EXPR node. */ #define TARGET_EXPR_SLOT(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 0) #define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND_CHECK_CODE (NODE, TARGET_EXPR, 1) |