GCC Middle and Back End API Reference
|
#include <diagnostic-buffer.h>
Public Member Functions | |
diagnostic_buffer (diagnostic_context &ctxt) | |
~diagnostic_buffer () | |
void | dump (FILE *out, int indent) const |
void DEBUG_FUNCTION | dump () const |
int | diagnostic_count (diagnostic_t kind) const |
bool | empty_p () const |
void | move_to (diagnostic_buffer &dest) |
Private Member Functions | |
void | ensure_per_format_buffers () |
Private Attributes | |
diagnostic_context & | m_ctxt |
auto_vec< diagnostic_per_format_buffer * > * | m_per_format_buffers |
diagnostic_counters | m_diagnostic_counters |
Friends | |
class | diagnostic_context |
Class representing a buffer of zero or more diagnostics that have been reported to a diagnostic_context, but which haven't yet been flushed. A diagnostic_buffer can be: * flushed to the diagnostic_context, which issues the diagnostics within the buffer to the output format and checks for limits such as -fmax-errors=, or * moved to another diagnostic_buffer, which moves the diagnostics within the first buffer to the other buffer, appending them after any existing diagnostics within the destination buffer, emptying the source buffer, or * cleared, which discards any diagnostics within the buffer without issuing them to the output format. Since a buffer needs to contain output-format-specific data, it's not possible to change the output format of the diagnostic_context once any buffers are non-empty. To simplify implementing output formats, it's not possible to change buffering on a diagnostic_context whilst within a diagnostic group.
diagnostic_buffer::diagnostic_buffer | ( | diagnostic_context & | ctxt | ) |
class diagnostic_buffer.
diagnostic_buffer::~diagnostic_buffer | ( | ) |
References m_per_format_buffers.
|
inline |
References diagnostic_counters::get_count(), and m_diagnostic_counters.
|
inline |
void diagnostic_buffer::dump | ( | FILE * | out, |
int | indent ) const |
References diagnostic_counters::dump(), m_diagnostic_counters, and m_per_format_buffers.
Referenced by diagnostic_context::dump().
bool diagnostic_buffer::empty_p | ( | ) | const |
References m_per_format_buffers.
|
private |
Lazily get the output formats to create their own kind of buffers. We can't change the output sinks on a context once this has been called on any diagnostic_buffer instances for that context, since there's no way to update all diagnostic_buffer instances for that context.
References gcc_assert, m_ctxt, diagnostic_context::m_output_sinks, and m_per_format_buffers.
Referenced by move_to(), and diagnostic_context::set_diagnostic_buffer().
void diagnostic_buffer::move_to | ( | diagnostic_buffer & | dest | ) |
|
friend |
|
private |
Referenced by ensure_per_format_buffers(), and move_to().
|
private |
|
private |