aboutsummaryrefslogtreecommitdiff
path: root/gcc/m2/gm2-gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/m2/gm2-gcc')
-rw-r--r--gcc/m2/gm2-gcc/m2color.cc2
-rw-r--r--gcc/m2/gm2-gcc/m2linemap.cc15
-rw-r--r--gcc/m2/gm2-gcc/rtegraph.cc21
3 files changed, 22 insertions, 16 deletions
diff --git a/gcc/m2/gm2-gcc/m2color.cc b/gcc/m2/gm2-gcc/m2color.cc
index fd30f46..a638d7c 100644
--- a/gcc/m2/gm2-gcc/m2color.cc
+++ b/gcc/m2/gm2-gcc/m2color.cc
@@ -23,7 +23,7 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "m2color.h"
#include "gcc-consolidation.h"
-#include "diagnostic-color.h"
+#include "diagnostics/color.h"
char *
diff --git a/gcc/m2/gm2-gcc/m2linemap.cc b/gcc/m2/gm2-gcc/m2linemap.cc
index feb62b3..89a1080 100644
--- a/gcc/m2/gm2-gcc/m2linemap.cc
+++ b/gcc/m2/gm2-gcc/m2linemap.cc
@@ -188,12 +188,13 @@ m2linemap_ErrorAt (location_t location, char *message)
static void
m2linemap_ErrorAtf_1 (location_t location, const char *message, ...)
{
- diagnostic_info diagnostic;
+ diagnostics::diagnostic_info diagnostic;
va_list ap;
rich_location richloc (line_table, location);
va_start (ap, message);
- diagnostic_set_info (&diagnostic, message, &ap, &richloc, DK_ERROR);
+ diagnostic_set_info (&diagnostic, message, &ap, &richloc,
+ diagnostics::kind::error);
diagnostic_report_diagnostic (global_dc, &diagnostic);
va_end (ap);
}
@@ -209,12 +210,13 @@ m2linemap_ErrorAtf (location_t location, const char *message)
static void
m2linemap_WarningAtf_1 (location_t location, const char *message, ...)
{
- diagnostic_info diagnostic;
+ diagnostics::diagnostic_info diagnostic;
va_list ap;
rich_location richloc (line_table, location);
va_start (ap, message);
- diagnostic_set_info (&diagnostic, message, &ap, &richloc, DK_WARNING);
+ diagnostic_set_info (&diagnostic, message, &ap, &richloc,
+ diagnostics::kind::warning);
diagnostic_report_diagnostic (global_dc, &diagnostic);
va_end (ap);
}
@@ -230,12 +232,13 @@ m2linemap_WarningAtf (location_t location, const char *message)
static void
m2linemap_NoteAtf_1 (location_t location, const char *message, ...)
{
- diagnostic_info diagnostic;
+ diagnostics::diagnostic_info diagnostic;
va_list ap;
rich_location richloc (line_table, location);
va_start (ap, message);
- diagnostic_set_info (&diagnostic, message, &ap, &richloc, DK_NOTE);
+ diagnostic_set_info (&diagnostic, message, &ap, &richloc,
+ diagnostics::kind::note);
diagnostic_report_diagnostic (global_dc, &diagnostic);
va_end (ap);
}
diff --git a/gcc/m2/gm2-gcc/rtegraph.cc b/gcc/m2/gm2-gcc/rtegraph.cc
index cd12582..f7b3065 100644
--- a/gcc/m2/gm2-gcc/rtegraph.cc
+++ b/gcc/m2/gm2-gcc/rtegraph.cc
@@ -283,9 +283,10 @@ rtegraph_lookup (gimple *g, tree fndecl, bool is_call)
/* rte_error_at - wraps up an error message. */
static void
-rte_error_at (location_t location, diagnostic_t kind, const char *message, ...)
+rte_error_at (location_t location, diagnostics::kind kind,
+ const char *message, ...)
{
- diagnostic_info diagnostic;
+ diagnostics::diagnostic_info diagnostic;
va_list ap;
rich_location richloc (line_table, location);
@@ -338,7 +339,7 @@ access_string (tree t, const char **value)
give the function context which might be misleading if this is inlined. */
static void
-generate_report (gimple *stmt, const char *report, diagnostic_t kind)
+generate_report (gimple *stmt, const char *report, diagnostics::kind kind)
{
if (gimple_call_num_args (stmt) == 5)
{
@@ -393,15 +394,16 @@ const char *rtenode::create_message (const char *with_name, const char *without_
return message;
}
-/* error_message issue an DK_ERROR from grtenode. */
+/* error_message issue an diagnostics::kind::error from grtenode. */
void rtenode::error_message (void)
{
if (grtenode != NULL)
- generate_report (grtenode, "runtime error will occur", DK_ERROR);
+ generate_report (grtenode, "runtime error will occur",
+ diagnostics::kind::error);
}
-/* warning_message issue an DK_WARNING from grtenode. */
+/* warning_message issue an diagnostics::kind::warning from grtenode. */
void rtenode::warning_message (void)
{
@@ -409,15 +411,16 @@ void rtenode::warning_message (void)
("runtime error will occur if an exported procedure is called from %s",
"runtime error will occur if an exported procedure is called");
if (grtenode != NULL)
- generate_report (grtenode, message, DK_WARNING);
+ generate_report (grtenode, message, diagnostics::kind::warning);
}
-/* note_message issue an DK_NOTE from grtenode. */
+/* note_message issue an diagnostics::kind::note from grtenode. */
void rtenode::note_message (void)
{
if (grtenode != NULL)
- generate_report (grtenode, "runtime will occur if this procedure is called", DK_NOTE);
+ generate_report (grtenode, "runtime will occur if this procedure is called",
+ diagnostics::kind::note);
}
/* dump_vec display contents of vector array list. */