]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: introduce diagnostic-macro-unwinding.h/cc
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 18 Jun 2024 14:59:56 +0000 (10:59 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 18 Jun 2024 14:59:56 +0000 (10:59 -0400)
commitbdcfe7f7f50ec64b45581a175d1eca41c74a3dfe
treee9ac7326eca1f8ec1763d86e509a92a26b2a5133
parentd3878c85f331c7a378245b636d5d230735b87347
diagnostics: introduce diagnostic-macro-unwinding.h/cc

Eliminate a dependency on "tree" from the code used by
diagnostic_path handling.

No functional change intended.

gcc/ChangeLog:
* Makefile.in (OBJS): Add diagnostic-macro-unwinding.o.

gcc/c-family/ChangeLog:
* c-opts.cc: Replace include of "tree-diagnostic.h" with
"diagnostic-macro-unwinding.h".

gcc/ChangeLog:
* diagnostic-macro-unwinding.cc: New file, with material taken
from tree-diagnostic.cc.
* diagnostic-macro-unwinding.h: New file, with material taken
from tree-diagnostic.h.
* tree-diagnostic-path.cc: Repalce include of "tree-diagnostic.h"
with "diagnostic-macro-unwinding.h".
* tree-diagnostic.cc (struct loc_map_pair): Move to
diagnostic-macro-unwinding.cc.
(maybe_unwind_expanded_macro_loc): Likewise.
(virt_loc_aware_diagnostic_finalizer): Likewise.
* tree-diagnostic.h (virt_loc_aware_diagnostic_finalizer): Move
decl to diagnostic-macro-unwinding.h.
(maybe_unwind_expanded_macro_loc): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/Makefile.in
gcc/c-family/c-opts.cc
gcc/diagnostic-macro-unwinding.cc [new file with mode: 0644]
gcc/diagnostic-macro-unwinding.h [new file with mode: 0644]
gcc/tree-diagnostic-path.cc
gcc/tree-diagnostic.cc
gcc/tree-diagnostic.h