public:
virtual ~client_data_hooks () {}
+ void dump (FILE *out, int indent) const;
+ void DEBUG_FUNCTION dump () const { dump (stderr, 0); }
+
/* Get version info for this client, or NULL. */
virtual const client_version_info *get_any_version_info () const = 0;
m_file_cache->dump (outfile, indent + 4);
else
dumping::emit_none (outfile, indent + 4);
+ dumping::emit_heading (outfile, indent + 2, "client data hooks");
+ if (m_client_data_hooks)
+ m_client_data_hooks->dump (outfile, indent + 4);
+ else
+ dumping::emit_none (outfile, indent + 4);
}
/* Return true if sufficiently severe diagnostics have been seen that
m_fixits_change_set = new changes::change_set (*m_file_cache);
}
+// class client_data_hooks
+
+void
+client_data_hooks::dump (FILE *outfile, int indent) const
+{
+ dumping::emit_heading (outfile, indent, "logical location manager");
+ if (auto mgr = get_logical_location_manager ())
+ mgr->dump (outfile, indent + 2);
+ else
+ dumping::emit_none (outfile, indent + 2);
+}
+
} // namespace diagnostics
/* Initialize DIAGNOSTIC, where the message MSG has already been
public:
virtual ~manager () {}
+ virtual void dump (FILE *out, int indent) const = 0;
+ void DEBUG_FUNCTION dump () const { dump (stderr, 0); }
+
/* vfuncs for interpreting keys. */
/* Get a string (or NULL) for K suitable for use by the SARIF logicalLocation
#include "coretypes.h"
#include "selftest.h"
#include "diagnostics/selftest-logical-locations.h"
+#include "diagnostics/dumping.h"
#if CHECKING_P
delete iter.second;
}
+void
+test_manager::dump (FILE *outfile, int indent) const
+{
+ dumping::emit_heading (outfile, indent, "test_manager");
+}
+
const char *
test_manager::get_short_name (key k) const
{
public:
~test_manager ();
+ void dump (FILE *out, int indent) const final override;
+
const char *get_short_name (key) const final override;
const char *get_name_with_scope (key) const final override;
const char *get_internal_name (key) const final override;
#include "diagnostics/digraphs.h"
#include "diagnostics/state-graphs.h"
#include "diagnostics/logical-locations.h"
+#include "diagnostics/dumping.h"
#include "diagnostics/changes.h"
#include "libgdiagnostics.h"
#include "libgdiagnostics-private.h"
return key::from_ptr (ptr);
}
+ void dump (FILE *outfile, int indent) const final override
+ {
+ diagnostics::dumping::emit_heading
+ (outfile, indent, "impl_logical_location_manager");
+ }
+
const char *get_short_name (key k) const final override
{
if (auto loc = ptr_from_key (k))
#include "tree-logical-location.h"
#include "langhooks.h"
#include "intl.h"
+#include "diagnostics/dumping.h"
using namespace diagnostics::logical_locations;
/* class tree_logical_location_manager
: public diagnostics::logical_locations::manager. */
+void
+tree_logical_location_manager::dump (FILE *outfile, int indent) const
+{
+ diagnostics::dumping::emit_heading (outfile, indent,
+ "tree_logical_location_manager");
+}
+
const char *
tree_logical_location_manager::get_short_name (key k) const
{
using key = diagnostics::logical_locations::key;
using kind = diagnostics::logical_locations::kind;
+ void dump (FILE *out, int indent) const final override;
+
const char *get_short_name (key) const final override;
const char *get_name_with_scope (key) const final override;
const char *get_internal_name (key) const final override;