aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/expand/rust-macro-expand.cc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2021-02-05 21:49:35 +0800
committerSimplyTheOther <simplytheother@gmail.com>2021-02-05 21:49:35 +0800
commit5c7dacd845ffb4b9a101308bc14241e7e9b939f8 (patch)
tree0d25f1e3f9bf7f192a06487cfb268719465df527 /gcc/rust/expand/rust-macro-expand.cc
parent7c7c76f27f6ab999ec8fa299bde8911911fa7d90 (diff)
downloadgcc-5c7dacd845ffb4b9a101308bc14241e7e9b939f8.zip
gcc-5c7dacd845ffb4b9a101308bc14241e7e9b939f8.tar.gz
gcc-5c7dacd845ffb4b9a101308bc14241e7e9b939f8.tar.bz2
Added some debug for cfg stripping and improved dump messages
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.cc')
-rw-r--r--gcc/rust/expand/rust-macro-expand.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.cc b/gcc/rust/expand/rust-macro-expand.cc
index cfd587b..29fc58b 100644
--- a/gcc/rust/expand/rust-macro-expand.cc
+++ b/gcc/rust/expand/rust-macro-expand.cc
@@ -1504,7 +1504,7 @@ public:
return;
}
- // TODO: strip sub-patterns of pattern
+ // strip sub-patterns of pattern
auto &pattern = expr.get_pattern ();
pattern->accept_vis (*this);
if (pattern->is_marked_for_strip ())
@@ -3283,7 +3283,12 @@ MacroExpander::fails_cfg_with_expand (std::vector<AST::Attribute> &attrs) const
attr.parse_attr_to_meta_item ();
if (!attr.check_cfg_predicate (session))
+ {
+ // DEBUG
+ fprintf (stderr, "cfg predicate failed for attribute: \033[0;31m'%s'\033[0m\n", attr.as_string ());
+
return true;
+ }
}
}
return false;