From: Pierre-Emmanuel Patry Date: Wed, 31 May 2023 09:17:56 +0000 (+0200) Subject: gccrs: converter: Add conversion from locations to spans X-Git-Tag: basepoints/gcc-15~2504 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c37722cc9d57d04e7f74a72295c3fa0df628e2c9;p=thirdparty%2Fgcc.git gccrs: converter: Add conversion from locations to spans Add function implementation to convert either a Location or a RicheLocation to a libproc_macro span. gcc/rust/ChangeLog: * util/rust-token-converter.cc (convert): Add implementation. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/util/rust-token-converter.cc b/gcc/rust/util/rust-token-converter.cc index a50d72181133..6c18ae34e283 100644 --- a/gcc/rust/util/rust-token-converter.cc +++ b/gcc/rust/util/rust-token-converter.cc @@ -18,6 +18,7 @@ #include "rust-token-converter.h" #include "libproc_macro/proc_macro.h" #include "bi-map.h" +#include "line-map.h" #include @@ -53,7 +54,7 @@ pop_group (std::vector &streams, static ProcMacro::Span convert (Location location) { - return ProcMacro::Span::make_unknown (); + return ProcMacro::Span::make_span (location.gcc_location (), 0); } static void