diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-27 15:57:07 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:56:02 +0100 |
commit | ff773b9030e443dbea0b4357bd10b480ff39c987 (patch) | |
tree | 2c5acc9c8a16a2f9e965a1959b582e1cb6328f85 /gcc/rust/Make-lang.in | |
parent | 6d1adb5c393814fd800c0fcf153204b6bf9ba417 (diff) | |
download | gcc-ff773b9030e443dbea0b4357bd10b480ff39c987.zip gcc-ff773b9030e443dbea0b4357bd10b480ff39c987.tar.gz gcc-ff773b9030e443dbea0b4357bd10b480ff39c987.tar.bz2 |
gccrs: converter: Move literal conversion out
The literal conversion code could be used for the literal_from_string
callback, this means we should move it out of the function in it's own
function. This involves a new switch, which is quite sad but we're not
yet at a performance profiling phase, there may be lower hanging fruits.
gcc/rust/ChangeLog:
* util/rust-token-converter.cc (handle_suffix): Rework function
to make it work with the new literal conversion function.
(convert_literal): Add a new function to convert to a proc macro
literal from a literal tokenptr. The function will abort if the
pointer does not point to a literal.
(convert): Add call to convert literal for every literal case.
* util/rust-token-converter.h (convert_literal): Add public
prototype.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/Make-lang.in')
0 files changed, 0 insertions, 0 deletions