]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Remove unused function
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 4 Feb 2026 22:38:13 +0000 (23:38 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 20 Mar 2026 17:10:36 +0000 (18:10 +0100)
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
gcc/rust/expand/rust-cfg-strip.h

index 071104036f790dac64a7aeb8ef7f58a24a25c4b2..59cec98af6c15586ca4c2a64c81f0d52f9425463 100644 (file)
 
 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.
index ace70af2b0bb43a7405428ec2684a073364e7bbd..dfe724a778fa2d9b4c751b9e9903f59cf0577b7d 100644 (file)
@@ -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: