GCC Middle and Back End API Reference
dumping.h
Go to the documentation of this file.
1/* Utilities for implementing "dump" functions for the diagnostics subsystem.
2 Copyright (C) 2025 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_DIAGNOSTICS_DUMP_H
22#define GCC_DIAGNOSTICS_DUMP_H
23
24namespace diagnostics {
25namespace dumping {
26
27extern void emit_indent (FILE *outfile, int indent);
28extern void emit_heading (FILE *outfile, int indent,
29 const char *text);
30
31extern void emit_string_field (FILE *outfile, int indent,
32 const char *label, const char *value);
33extern void emit_bool_field (FILE *outfile, int indent,
34 const char *label, bool value);
35extern void emit_size_t_field (FILE *outfile, int indent,
36 const char *label, size_t value);
37extern void emit_int_field (FILE *outfile, int indent,
38 const char *label, int value);
39extern void emit_unsigned_field (FILE *outfile, int indent,
40 const char *label, unsigned value);
41
42extern void emit_none (FILE *outfile, int indent);
43
44#define DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD(FLAG) \
45 dumping::emit_bool_field (outfile, indent, #FLAG, FLAG)
46
47} // namespace dumping
48} // namespace diagnostics
49
50#endif /* ! GCC_DIAGNOSTICS_DUMP_H */
Definition dumping.cc:28
void emit_indent(FILE *outfile, int indent)
Definition dumping.cc:33
void emit_size_t_field(FILE *outfile, int indent, const char *label, size_t value)
Definition dumping.cc:68
void emit_heading(FILE *outfile, int indent, const char *text)
Definition dumping.cc:41
void emit_unsigned_field(FILE *outfile, int indent, const char *label, unsigned value)
Definition dumping.cc:84
void emit_bool_field(FILE *outfile, int indent, const char *label, bool value)
Definition dumping.cc:60
void emit_int_field(FILE *outfile, int indent, const char *label, int value)
Definition dumping.cc:76
void emit_string_field(FILE *outfile, int indent, const char *label, const char *value)
Definition dumping.cc:52
void emit_none(FILE *outfile, int indent)
Definition dumping.cc:94
Definition coretypes.h:167