diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-05-31 11:17:56 +0200 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-06-01 15:23:35 +0000 |
commit | f35d52ce69df89401bde47f648868fb227a7de40 (patch) | |
tree | ef7289c7635e28253230b8faa8cd2b3b199c937b /gcc | |
parent | e26fea0f490162008884e8f010650da2ae5e8d38 (diff) | |
download | gcc-f35d52ce69df89401bde47f648868fb227a7de40.zip gcc-f35d52ce69df89401bde47f648868fb227a7de40.tar.gz gcc-f35d52ce69df89401bde47f648868fb227a7de40.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-token-converter.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/util/rust-token-converter.cc b/gcc/rust/util/rust-token-converter.cc index a50d721..6c18ae3 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 <string> @@ -53,7 +54,7 @@ pop_group (std::vector<ProcMacro::TokenStream> &streams, static ProcMacro::Span convert (Location location) { - return ProcMacro::Span::make_unknown (); + return ProcMacro::Span::make_span (location.gcc_location (), 0); } static void |