aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJiakun Fan <120090316@link.cuhk.edu.cn>2023-03-11 17:47:32 +0000
committerPhilip Herron <philip.herron@embecosm.com>2023-03-17 16:38:54 +0000
commit04b04f7a0394c566d2958d457a92b1ad44043c5b (patch)
tree2571374af4027c17eddb849b7dd9c3eee83a8496 /gcc
parent47a7a4d646eda1c0bf9dfdc433818249a3fd7e18 (diff)
downloadgcc-04b04f7a0394c566d2958d457a92b1ad44043c5b.zip
gcc-04b04f7a0394c566d2958d457a92b1ad44043c5b.tar.gz
gcc-04b04f7a0394c566d2958d457a92b1ad44043c5b.tar.bz2
Dump inner attrs for Dump::visit(BlockExpr &)
Refer to `BlockExpr::as_string ()`, dump inner attrs for `Dump::vist` gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): dump inner attrs Signed-off-by: Jiakun Fan <120090316@link.cuhk.edu.cn>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/hir/rust-hir-dump.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index 694a809..f2df4a0 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -238,7 +238,22 @@ Dump::visit (BlockExpr &block_expr)
stream << "BlockExpr: [";
indentation.increment ();
stream << std::endl;
+
// TODO: inner attributes
+ stream << std::string (indent, indent_char);
+ stream << "inner attributes: ";
+ if (!block_expr.inner_attrs.empty ())
+ {
+ for (const auto &attr : block_expr.inner_attrs)
+ {
+ stream << std::endl;
+ stream << std::string (indent, indent_char);
+ stream << attr.as_string ();
+ // stream << attr.accept_vis(*self);
+ }
+ }
+
+ stream << std::endl;
// statements
if (block_expr.has_statements ())