diff options
Diffstat (limited to 'gcc/pretty-print.h')
-rw-r--r-- | gcc/pretty-print.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index 56abe03..0d67e30 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -215,17 +215,18 @@ class format_postprocessor and add additional fields they need. */ struct pretty_printer { - // Default construct a pretty printer with specified prefix - // and a maximum line length cut off limit. - explicit pretty_printer (const char* = NULL, int = 0); + /* Default construct a pretty printer with specified + maximum line length cut off limit. */ + explicit pretty_printer (int = 0); virtual ~pretty_printer (); /* Where we print external representation of ENTITY. */ output_buffer *buffer; - /* The prefix for each new line. */ - const char *prefix; + /* The prefix for each new line. If non-NULL, this is "owned" by the + pretty_printer, and will eventually be free-ed. */ + char *prefix; /* Where to put whitespace around the entity being formatted. */ pp_padding padding; @@ -338,7 +339,8 @@ pp_get_prefix (const pretty_printer *pp) { return pp->prefix; } #define pp_buffer(PP) (PP)->buffer extern void pp_set_line_maximum_length (pretty_printer *, int); -extern void pp_set_prefix (pretty_printer *, const char *); +extern void pp_set_prefix (pretty_printer *, char *); +extern char *pp_take_prefix (pretty_printer *); extern void pp_destroy_prefix (pretty_printer *); extern int pp_remaining_character_count_for_line (pretty_printer *); extern void pp_clear_output_area (pretty_printer *); |