]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: add diagnostic_context::get_location_text
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 28 Nov 2023 01:09:35 +0000 (20:09 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 28 Nov 2023 01:09:35 +0000 (20:09 -0500)
commit93096d3ce14a89603bd30f0298fc15000a61e757
treef6ab97bfaa3d9853ec34fd5755fc2866bb6e6b2a
parentad3e759c172272f6f2ba66631e7e7bd03fb2b436
diagnostics: add diagnostic_context::get_location_text

No functional change intended.

gcc/ChangeLog:
* diagnostic.cc (diagnostic_get_location_text): Convert to...
(diagnostic_context::get_location_text): ...this, and convert
return type from char * to label_text.
(diagnostic_build_prefix): Update for above change.
(default_diagnostic_start_span_fn): Likewise.
(selftest::assert_location_text): Likewise.
* diagnostic.h (diagnostic_context::get_location_text): New decl.

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