aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-29 12:47:51 +0000
committerGitHub <noreply@github.com>2022-01-29 12:47:51 +0000
commitbc7f518ac6f5c05f1c6edd7a1601f32753bab47d (patch)
tree52b86d1861ae8d09d77169b0a53b8ccbc245b48f /gcc/rust/hir
parent9346bddb100a3a047e22f980e64c36006fa029d5 (diff)
parentebfbdf962fb3e65e17ad8a0477558549e924dd22 (diff)
downloadgcc-bc7f518ac6f5c05f1c6edd7a1601f32753bab47d.zip
gcc-bc7f518ac6f5c05f1c6edd7a1601f32753bab47d.tar.gz
gcc-bc7f518ac6f5c05f1c6edd7a1601f32753bab47d.tar.bz2
Merge #899
899: Add -frust-cfg=value option for adding config options r=philberty a=philberty This adds the initial support for config expansion on custom config values it need support for parsing options such as feature=test with apropriate error handling withing Session::handle_cfg_option(const std::string&). This also applies the mark_for_strip checks only on AST::Functions and will need applied to the rest of the crate in #872. Addresses #889 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/rust-ast-lower-item.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-item.h b/gcc/rust/hir/rust-ast-lower-item.h
index 23ff5b2..b67016c 100644
--- a/gcc/rust/hir/rust-ast-lower-item.h
+++ b/gcc/rust/hir/rust-ast-lower-item.h
@@ -44,15 +44,6 @@ public:
{
ASTLoweringItem resolver;
item->accept_vis (resolver);
-
- // this is useful for debugging
- // if (resolver.translated == nullptr)
- // {
- // rust_fatal_error (item->get_locus (), "failed to lower: %s",
- // item->as_string ().c_str ());
- // return nullptr;
- // }
-
return resolver.translated;
}
@@ -419,6 +410,9 @@ public:
void visit (AST::Function &function) override
{
+ if (function.is_marked_for_strip ())
+ return;
+
std::vector<std::unique_ptr<HIR::WhereClauseItem>> where_clause_items;
for (auto &item : function.get_where_clause ().get_items ())
{