aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-07-27 15:57:07 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-07-28 09:15:21 +0000
commit69454e53048e24c80c725f4258d6dfd13f7ed023 (patch)
treebe245238f3df3093098da69e50dfa4b7bdff362e /gcc/rust/hir/rust-hir-dump.cc
parent9b62bc32f58925e9d74fdb11e13fad23c6d9d3e8 (diff)
downloadgcc-69454e53048e24c80c725f4258d6dfd13f7ed023.zip
gcc-69454e53048e24c80c725f4258d6dfd13f7ed023.tar.gz
gcc-69454e53048e24c80c725f4258d6dfd13f7ed023.tar.bz2
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/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions