[COMMITTED 06/41] gccrs: Remove unused function
arthur.cohen@embecosm.com
arthur.cohen@embecosm.com
Fri Mar 20 17:29:55 GMT 2026
From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
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>
---
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 071104036f7..59cec98af6c 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 ace70af2b0b..dfe724a778f 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:
--
2.50.1
More information about the Gcc-rust
mailing list