diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-03-06 09:58:02 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-03-07 10:07:31 +0000 |
commit | f6e926a68941cda00086c3ed29523de0c0980b9f (patch) | |
tree | d2261cf70b1d8e5ec43ccc2f1e3b29d6575ca517 /gcc/rust/hir/rust-hir-dump.cc | |
parent | 914b938884f9903681305184534a2e9869760f84 (diff) | |
download | gcc-f6e926a68941cda00086c3ed29523de0c0980b9f.zip gcc-f6e926a68941cda00086c3ed29523de0c0980b9f.tar.gz gcc-f6e926a68941cda00086c3ed29523de0c0980b9f.tar.bz2 |
expand: Add stringify macro
Add the stringify macro expansion as well as some tests.
gcc/rust/ChangeLog:
* ast/rust-macro.cc (builtin_macro_from_string): Add identifier
identification.
* ast/rust-macro.h (enum class): Add Stringify builtin macro
type.
* expand/rust-macro-builtins.cc (make_macro_path_str): Add path
for builtin stringify macro.
(MacroBuiltin::stringify_handler): Add handler for builtin
stringify macro.
* expand/rust-macro-builtins.h: Add stringify handler's
prototype.
* util/rust-hir-map.cc (Mappings::insert_macro_def): Add
stringify handler to builtin hir map.
gcc/testsuite/ChangeLog:
* rust/compile/stringify.rs: Add a basic test with some text.
* rust/execute/torture/builtin_macro_stringify.rs: Verify the
text is left as is without any other macro expansion.
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