[gcc r16-8198] gccrs: Remove unused function
Arthur Cohen
cohenarthur@gcc.gnu.org
Fri Mar 20 17:23:47 GMT 2026
https://gcc.gnu.org/g:ea66f8aaee8cdc0ab145178f6d10f5c4cb46f0a6
commit r16-8198-gea66f8aaee8cdc0ab145178f6d10f5c4cb46f0a6
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Wed Feb 4 23:38:13 2026 +0100
gccrs: Remove unused function
gcc/rust/ChangeLog:
* expand/rust-cfg-strip.cc (CfgStrip::fails_cfg): Remove function.
* expand/rust-cfg-strip.h: Remove function prototype.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/rust/expand/rust-cfg-strip.cc | 21 ---------------------
gcc/rust/expand/rust-cfg-strip.h | 2 --
2 files changed, 23 deletions(-)
diff --git a/gcc/rust/expand/rust-cfg-strip.cc b/gcc/rust/expand/rust-cfg-strip.cc
index 071104036f79..59cec98af6c1 100644
--- a/gcc/rust/expand/rust-cfg-strip.cc
+++ b/gcc/rust/expand/rust-cfg-strip.cc
@@ -26,27 +26,6 @@
namespace Rust {
-/**
- * Determines whether any cfg predicate is false and hence item with attributes
- * should be stripped. Note that attributes must be expanded before calling.
- */
-bool
-CfgStrip::fails_cfg (const AST::AttrVec &attrs) const
-{
- auto &session = Session::get_instance ();
-
- for (const auto &attr : attrs)
- {
- if (attr.get_path () == Values::Attributes::CFG
- && !attr.check_cfg_predicate (session))
- return true;
- else if (!expansion_cfg.should_test
- && attr.get_path () == Values::Attributes::TEST)
- return true;
- }
- return false;
-}
-
/**
* Determines whether any cfg predicate is false and hence item with attributes
* should be stripped. Will expand attributes as well.
diff --git a/gcc/rust/expand/rust-cfg-strip.h b/gcc/rust/expand/rust-cfg-strip.h
index ace70af2b0bb..dfe724a778fa 100644
--- a/gcc/rust/expand/rust-cfg-strip.h
+++ b/gcc/rust/expand/rust-cfg-strip.h
@@ -31,8 +31,6 @@ struct ExpansionCfg;
class CfgStrip : public AST::DefaultASTVisitor
{
private:
- bool fails_cfg (const AST::AttrVec &attrs) const;
-
bool fails_cfg_with_expand (AST::AttrVec &attrs) const;
public:
More information about the Gcc-cvs
mailing list