aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2021-02-06 16:25:10 +0800
committerSimplyTheOther <simplytheother@gmail.com>2021-02-06 16:25:10 +0800
commit3571e997473c87dcdb2ca590951acbd698382a33 (patch)
tree00e1a6944337c118f2750a4f5865e774fc3b1c8a
parentd0e10517881b190de1724b29257a3e408b203d43 (diff)
downloadgcc-3571e997473c87dcdb2ca590951acbd698382a33.zip
gcc-3571e997473c87dcdb2ca590951acbd698382a33.tar.gz
gcc-3571e997473c87dcdb2ca590951acbd698382a33.tar.bz2
Added more debug for cfg predicate checking
-rw-r--r--gcc/rust/expand/rust-macro-expand.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.cc b/gcc/rust/expand/rust-macro-expand.cc
index cd37673..e9f2e2a 100644
--- a/gcc/rust/expand/rust-macro-expand.cc
+++ b/gcc/rust/expand/rust-macro-expand.cc
@@ -3282,12 +3282,19 @@ MacroExpander::fails_cfg_with_expand (std::vector<AST::Attribute> &attrs) const
if (!attr.is_parsed_to_meta_item ())
attr.parse_attr_to_meta_item ();
+ // DEBUG
+ if (!attr.is_parsed_to_meta_item ())
+ fprintf (stderr, "failed to parse attr to meta item, right before cfg predicate check\n");
+
if (!attr.check_cfg_predicate (session))
{
// DEBUG
fprintf (stderr, "cfg predicate failed for attribute: \033[0;31m'%s'\033[0m\n", attr.as_string ().c_str ());
return true;
+ } else {
+ // DEBUG
+ fprintf (stderr, "cfg predicate succeeded for attribute: \033[0;31m'%s'\033[0m\n", attr.as_string ().c_str ());
}
}
}