[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 08/10] ir: drop unused data members from {environment,qualified_name}_setter
The data members environment_setter::artifact_ and
qualified_name_setter::node_ are not used and can therefore be dropped
along with all their references.
* src/abg-ir.cc: drop unused data members
Signed-off-by: Matthias Maennich <maennich@google.com>
---
src/abg-ir.cc | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/abg-ir.cc b/src/abg-ir.cc
index 1a6aed7ff0e4..192c52ab9c39 100644
--- a/src/abg-ir.cc
+++ b/src/abg-ir.cc
@@ -56,14 +56,11 @@ namespace
/// to a new environment.
class environment_setter : public abigail::ir::ir_node_visitor
{
- abigail::ir::type_or_decl_base* artifact_;
const abigail::ir::environment* env_;
public:
- environment_setter(abigail::ir::type_or_decl_base* a,
- const abigail::ir::environment* env)
- : artifact_(a),
- env_(env)
+ environment_setter(const abigail::ir::environment* env)
+ : env_(env)
{}
/// This function is called on each sub-tree node that is a
@@ -112,13 +109,8 @@ public:
/// function update_qualified_name().
class qualified_name_setter : public abigail::ir::ir_node_visitor
{
- abigail::ir::decl_base* node_;
public:
- qualified_name_setter(abigail::ir::decl_base* node)
- : node_(node)
- {}
-
bool
do_update(abigail::ir::decl_base* d);
@@ -2803,7 +2795,7 @@ set_environment_for_artifact(type_or_decl_base* artifact,
{
ABG_ASSERT(artifact && env);
- ::environment_setter s(artifact, env);
+ ::environment_setter s(env);
artifact->traverse(s);
}
@@ -4988,7 +4980,7 @@ peel_typedef_pointer_or_reference_type(const type_base* type,
static void
update_qualified_name(decl_base * d)
{
- ::qualified_name_setter setter(d);
+ ::qualified_name_setter setter;
d->traverse(setter);
}
--
2.21.0.392.gf8f6787159e-goog