diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-02-02 15:05:19 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-02-02 16:47:19 +0000 |
commit | 4d1ca35582e69e8677bd96775edbf03b6eec6ab8 (patch) | |
tree | 4baa7da3f520efec9d02c4d0c44a8b07268a6f5d /gcc/rust/resolve/rust-ast-resolve-toplevel.h | |
parent | f7f14de056eb3887e70f29b0f29da4025f746559 (diff) | |
download | gcc-4d1ca35582e69e8677bd96775edbf03b6eec6ab8.zip gcc-4d1ca35582e69e8677bd96775edbf03b6eec6ab8.tar.gz gcc-4d1ca35582e69e8677bd96775edbf03b6eec6ab8.tar.bz2 |
Apply the is_marked_for_strip check to the rest of the crate
We need to apply this to all levels of the crate:
Item
impl-item
trait-item
Stmt
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-toplevel.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-toplevel.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-toplevel.h b/gcc/rust/resolve/rust-ast-resolve-toplevel.h index 56962f6..7aba67f 100644 --- a/gcc/rust/resolve/rust-ast-resolve-toplevel.h +++ b/gcc/rust/resolve/rust-ast-resolve-toplevel.h @@ -36,6 +36,9 @@ public: static void go (AST::Item *item, const CanonicalPath &prefix, const CanonicalPath &canonical_prefix) { + if (item->is_marked_for_strip ()) + return; + ResolveTopLevel resolver (prefix, canonical_prefix); item->accept_vis (resolver); }; @@ -286,9 +289,6 @@ public: void visit (AST::Function &function) override { - if (function.is_marked_for_strip ()) - return; - auto decl = ResolveFunctionItemToCanonicalPath::resolve (function); auto path = prefix.append (decl); auto cpath = canonical_prefix.append (decl); |