]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostics: convert diagnostic_ready_p to an inline function
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 14 Nov 2023 19:01:36 +0000 (14:01 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 14 Nov 2023 19:01:36 +0000 (14:01 -0500)
No functional change intended.

gcc/ChangeLog:
* diagnostic.h (diagnostic_ready_p): Convert from macro to inline
function.

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

index 7ae7cebf02ed0b2b6bc17ffc93e1c4989e03161e..2489855ae4a4553b70fce09f0dad8da2ce926e40 100644 (file)
@@ -764,7 +764,11 @@ extern diagnostic_context *global_dc;
 
 /* Returns whether the diagnostic framework has been intialized already and is
    ready for use.  */
-#define diagnostic_ready_p() (global_dc->printer != NULL)
+inline bool
+diagnostic_ready_p ()
+{
+  return global_dc->printer != nullptr;
+}
 
 /* The number of errors that have been issued so far.  Ideally, these
    would take a diagnostic_context as an argument.  */