]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostics: make diagnostic_context::m_abort_on_error private
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 28 Apr 2025 22:21:18 +0000 (18:21 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 28 Apr 2025 22:21:18 +0000 (18:21 -0400)
No functional change intended.

gcc/ChangeLog:
* diagnostic.h (diagnostic_context::set_abort_on_error): New.
(diagnostic_context::m_abort_on_error): Make private.
(diagnostic_abort_on_error): Delete.
* opts.cc (setup_core_dumping): Update for above changes.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/diagnostic.h
gcc/opts.cc

index 62bffd2c6851a3173a4f1ef2da6f918abd07de74..c679017d28505c957e073363a144de92a2768d11 100644 (file)
@@ -772,6 +772,13 @@ public:
 
   bool supports_fnotice_on_stderr_p () const;
 
+  /* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher.  */
+  void
+  set_abort_on_error (bool val)
+  {
+    m_abort_on_error = val;
+  }
+
 private:
   void error_recursion () ATTRIBUTE_NORETURN;
 
@@ -828,10 +835,10 @@ private:
      each diagnostic, if known.  */
   bool m_show_option_requested;
 
-public:
   /* True if we should raise a SIGABRT on errors.  */
   bool m_abort_on_error;
 
+public:
   /* True if we should show the column number on diagnostics.  */
   bool m_show_column;
 
@@ -1042,13 +1049,6 @@ diagnostic_text_finalizer (diagnostic_context *context)
 #define diagnostic_context_auxiliary_data(DC) (DC)->m_client_aux_data
 #define diagnostic_info_auxiliary_data(DI) (DI)->x_data
 
-/* Raise SIGABRT on any diagnostic of severity DK_ERROR or higher.  */
-inline void
-diagnostic_abort_on_error (diagnostic_context *context)
-{
-  context->m_abort_on_error = true;
-}
-
 /* This diagnostic_context is used by front-ends that directly output
    diagnostic messages without going through `error', `warning',
    and similar functions.  */
index d3e3a2dc0d1232aa512ab8120a41502c0b3f2bbe..a9b9b9148a9593e4aa2229b3025404f2f1c42552 100644 (file)
@@ -3628,7 +3628,7 @@ setup_core_dumping (diagnostic_context *dc)
                   "setting core file size limit to maximum: %m");
   }
 #endif
-  diagnostic_abort_on_error (dc);
+  dc->set_abort_on_error (true);
 }
 
 /* Parse a -d<ARG> command line switch for OPTS, location LOC,