GCC Middle and Back End API Reference
|
#include <buffering.h>
Public Member Functions | |
buffer (context &ctxt) | |
~buffer () | |
void | dump (FILE *out, int indent) const |
void DEBUG_FUNCTION | dump () const |
int | diagnostic_count (enum kind kind) const |
bool | empty_p () const |
void | move_to (buffer &dest) |
Private Member Functions | |
void | ensure_per_sink_buffers () |
Private Attributes | |
context & | m_ctxt |
auto_vec< per_sink_buffer * > * | m_per_sink_buffers |
counters | m_diagnostic_counters |
Friends | |
class | context |
Class representing a buffer of zero or more diagnostics that have been reported to a diagnostics::context, but which haven't yet been flushed. A diagnostics::buffer can be: * flushed to the diagnostics::context, which issues the diagnostics within the buffer to the output sinks and checks for limits such as -fmax-errors=, or * moved to another diagnostics::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 sinks. Since a buffer needs to contain sink-specific data, it's not possible to change the output sink(s) of the diagnostics::context once any buffers are non-empty. To simplify implementing output sinks, it's not possible to change buffering on a diagnostics::context whilst within a diagnostic group.
diagnostics::buffer::buffer | ( | context & | ctxt | ) |
class diagnostics::buffer.
References context, m_ctxt, and m_per_sink_buffers.
Referenced by move_to().
diagnostics::buffer::~buffer | ( | ) |
References m_per_sink_buffers.
|
inline |
References m_diagnostic_counters.
Referenced by diagnostics::context::flush_diagnostic_buffer().
|
inline |
References DEBUG_FUNCTION, and dump().
Referenced by dump().
void diagnostics::buffer::dump | ( | FILE * | out, |
int | indent ) const |
bool diagnostics::buffer::empty_p | ( | ) | const |
References m_per_sink_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 diagnostics::buffer instances for that context, since there's no way to update all diagnostics::buffer instances for that context.
References gcc_assert, m_ctxt, and m_per_sink_buffers.
Referenced by move_to(), and diagnostics::context::set_diagnostic_buffer().
void diagnostics::buffer::move_to | ( | buffer & | dest | ) |
References buffer(), ensure_per_sink_buffers(), gcc_assert, m_ctxt, m_diagnostic_counters, and m_per_sink_buffers.
|
private |
Referenced by buffer(), ensure_per_sink_buffers(), and move_to().
|
private |
|
private |