diff options
author | David Malcolm <dmalcolm@redhat.com> | 2023-11-14 14:01:36 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2023-11-14 14:01:36 -0500 |
commit | d0bfd6ba3ba77fd372c1d3621521693b653cf8b1 (patch) | |
tree | 3a9c4415559c564ab410731a13f432ae0b1f75bd | |
parent | b42a09b258c3ed8d1368e0ef0948034dcf0f8ac9 (diff) | |
download | gcc-d0bfd6ba3ba77fd372c1d3621521693b653cf8b1.zip gcc-d0bfd6ba3ba77fd372c1d3621521693b653cf8b1.tar.gz gcc-d0bfd6ba3ba77fd372c1d3621521693b653cf8b1.tar.bz2 |
diagnostics: convert diagnostic_ready_p to an inline function
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>
-rw-r--r-- | gcc/diagnostic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 7ae7ceb..2489855 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -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. */ |