From: Pierre-Emmanuel Patry <[email protected]>

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 <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/20559969863551f7b62d77d4122d558d3e4b87bf

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4425

 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 071104036..59cec98af 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 ace70af2b..dfe724a77 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.53.0

Reply via email to