aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-ast.cc')
-rw-r--r--gcc/rust/ast/rust-ast.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 813c35b..a5b7f60b 100644
--- a/gcc/rust/ast/rust-ast.cc
+++ b/gcc/rust/ast/rust-ast.cc
@@ -1323,6 +1323,12 @@ std::string
MacroInvocation::as_string () const
{
std::string str = "MacroInvocation: ";
+ auto is_builtin = kind == InvocKind::Builtin;
+
+ if (is_builtin)
+ str += "[builtin] ";
+ else
+ str += "[regular] ";
str += append_attributes (outer_attrs, OUTER);
@@ -1331,6 +1337,16 @@ MacroInvocation::as_string () const
str += "\n has semicolon: ";
str += has_semicolon () ? "true" : "false";
+ if (is_builtin)
+ {
+ str += "[PENDING EAGER INVOCATIONS]: ";
+ for (auto &pending : pending_eager_invocs)
+ {
+ str += pending->as_string ();
+ str += "\n";
+ }
+ }
+
return str;
}