diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 175ab28..d9fc80b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5522,6 +5522,10 @@ decl_template_parm_check (const_tree t, const char *f, int l, const char *fn) #define DECL_RAMP_FN(NODE) \ (coro_get_ramp_function (NODE)) +/* For a FUNCTION_DECL this is true if it is a coroutine ramp. */ +#define DECL_RAMP_P(NODE) \ + DECL_COROUTINE_P (NODE) && !DECL_RAMP_FN (NODE) + /* True for an OMP_ATOMIC that has dependent parameters. These are stored as an expr in operand 1, and integer_zero_node or clauses in operand 0. */ #define OMP_ATOMIC_DEPENDENT_P(NODE) \ @@ -6822,6 +6826,7 @@ extern int class_dump_id; extern int module_dump_id; extern int raw_dump_id; extern int coro_dump_id; +extern int tinst_dump_id; /* Whether the current context is manifestly constant-evaluated. Used by the constexpr machinery to control folding of @@ -7322,6 +7327,29 @@ extern void cp_check_const_attributes (tree); extern void maybe_propagate_warmth_attributes (tree, tree); /* in error.cc */ +/* A class for pretty-printing to -flang-dump-XXX files. Used like + + if (cxx_dump_pretty_printer pp {foo_dump_id}) + { + pp_printf (&pp, ...); + } + + If the dump is enabled, the pretty printer will open the dump file and + attach to it, and flush and close the file on destruction. */ + +class cxx_dump_pretty_printer: public pretty_printer +{ + int phase; + FILE *outf; + dump_flags_t flags; + +public: + cxx_dump_pretty_printer (int phase); + operator bool() { return outf != nullptr; } + bool has_flag (dump_flags_t f) { return (flags & f); } + ~cxx_dump_pretty_printer (); +}; + extern const char *type_as_string (tree, int); extern const char *type_as_string_translate (tree, int); extern const char *decl_as_string (tree, int); |