public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7635] gccrs: converter: Add conversion from locations to spans
@ 2024-01-16 17:49 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 17:49 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c37722cc9d57d04e7f74a72295c3fa0df628e2c9

commit r14-7635-gc37722cc9d57d04e7f74a72295c3fa0df628e2c9
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Wed May 31 11:17:56 2023 +0200

    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 <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/rust/util/rust-token-converter.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/rust/util/rust-token-converter.cc b/gcc/rust/util/rust-token-converter.cc
index a50d7218113..6c18ae34e28 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 17:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 17:49 [gcc r14-7635] gccrs: converter: Add conversion from locations to spans Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).