]> git.ipfire.org Git - thirdparty/gcc.git/commit
simple-diagnostic-path: Inline two trivial methods [PR116143]
authorJakub Jelinek <jakub@redhat.com>
Wed, 26 Feb 2025 09:50:51 +0000 (10:50 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 26 Feb 2025 09:50:51 +0000 (10:50 +0100)
commit3b72464ba5e4597d2d559bcdbf150637adeb00b0
treeee628bb1944ffa65337d7e23d01428eef995ea0f
parent751b37047b2ad3a358d41ac792487b42430e9901
simple-diagnostic-path: Inline two trivial methods [PR116143]

Various plugin tests fail with --enable-checking=release, because the
num_events and num_threads methods of simple_diagnostic_path are only used
inside of #if CHECKING_P code inside of GCC proper and then tested inside of
some plugin tests.  So, with --enable-checking=yes they are compiled into
cc1/cc1plus etc. binaries and plugins can call those, but with
--enable-checking=release they are optimized away (at least for LTO builds).

As they are trivial, the following patch just defines them inline, so that
the plugin tests get their definitions directly and don't have to rely
on cc1/cc1plus etc. exporting those.

2025-02-26  Jakub Jelinek  <jakub@redhat.com>

PR testsuite/116143
* simple-diagnostic-path.h (simple_diagnostic_path::num_events): Define
inline.
(simple_diagnostic_path::num_threads): Likewise.
* simple-diagnostic-path.cc (simple_diagnostic_path::num_events):
Remove out of line definition.
(simple_diagnostic_path::num_threads): Likewise.
gcc/simple-diagnostic-path.cc
gcc/simple-diagnostic-path.h