]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Print macro invocations in AST dump
authorMatthew Jasper <mjjasper1@gmail.com>
Sat, 3 Jun 2023 12:37:51 +0000 (13:37 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:46:28 +0000 (18:46 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::visit): Print macro invocations.

Signed-off-by: Matthew Jasper <mjjasper1@gmail.com>
gcc/rust/ast/rust-ast-dump.cc

index d486b1deb8bab3ca6099f8f76c810fbbcf81db13..8cd99fcc17d7a8e4df174426f0b50c6874facbc0 100644 (file)
@@ -1570,8 +1570,11 @@ Dump::visit (MacroRulesDefinition &rules_def)
 }
 
 void
-Dump::visit (MacroInvocation &)
-{}
+Dump::visit (MacroInvocation &invocation)
+{
+  // FIXME: make this accurately reflect the original macro syntax.
+  stream << invocation.get_invoc_data ().as_string ();
+}
 
 void
 Dump::visit (MetaItemPath &)