diff options
| author | David Malcolm <dmalcolm@redhat.com> | 2025-10-09 11:38:50 -0400 |
|---|---|---|
| committer | David Malcolm <dmalcolm@redhat.com> | 2025-10-09 11:38:50 -0400 |
| commit | 0558c6028e47eb623365c3865577f40f9d1fa27c (patch) | |
| tree | ccd4685f9bf58fd522c124fcaa57b35c7233c6fb /libcc1 | |
| parent | ea05497d4a329f183ffb5428befc957c5522ef86 (diff) | |
diagnostics: add class sink::extension
This patch provides a way for plugins to add extra information
to a diagnostic sink, potentially capturing more information via
a "finalizer" hook.
gcc/c-family/ChangeLog:
* c-opts.cc: Define INCLUDE_VECTOR.
gcc/cp/ChangeLog:
* error.cc: Define INCLUDE_VECTOR.
gcc/ChangeLog:
* diagnostic-global-context.cc: Define INCLUDE_VECTOR.
* diagnostics/buffering.cc: Likewise.
* diagnostics/context.cc (context::finish): Call
finalize_extensions on each sink.
(sink::dump): Dump any extensions.
(sink::finalize_extensions): New.
* diagnostics/macro-unwinding.cc: Define INCLUDE_VECTOR.
* diagnostics/selftest-context.cc: Likewise.
* diagnostics/sink.h (class sink::extension): New.
(sink::add_extension): New.
(sink::finalize_extensions): New decl.
(sink::m_extensions): New member.
* gcc.cc: Define INCLUDE_VECTOR.
* langhooks.cc: Likewise.
* opts.cc: Likewise.
* tree-diagnostic-client-data-hooks.cc: Likewise.
* tree-diagnostic.cc: Likewise.
gcc/fortran/ChangeLog:
* error.cc: Define INCLUDE_VECTOR.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic_group_plugin.cc: Define INCLUDE_VECTOR.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Likewise.
* gcc.dg/plugin/location_overflow_plugin.cc: Likewise.
libcc1/ChangeLog:
* context.cc: Define INCLUDE_VECTOR.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libcc1')
| -rw-r--r-- | libcc1/context.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libcc1/context.cc b/libcc1/context.cc index 38343a7c29e..b392f774c72 100644 --- a/libcc1/context.cc +++ b/libcc1/context.cc @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see #undef PACKAGE_TARNAME #undef PACKAGE_VERSION +#define INCLUDE_VECTOR #include "gcc-plugin.h" #include "system.h" #include "coretypes.h" |
