/*
- Copyright (C) 2010 Red Hat, Inc.
+ Copyright (C) 2010, 2011 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
Network licensing program, please visit www.openinventionnetwork.com
<http://www.openinventionnetwork.com>. */
-#include "highlevel_check.hh"
-#include "all-dies-it.hh"
+#include "check_die_tree.hh"
#include "pri.hh"
#include "messages.hh"
#include <map>
namespace
{
class check_duplicate_DW_tag_variable
- : public highlevel_check<check_duplicate_DW_tag_variable>
+ : public die_check
{
struct varinfo
{
return &cd;
}
- check_duplicate_DW_tag_variable (checkstack &stack, dwarflint &lint);
- };
-
- reg<check_duplicate_DW_tag_variable> reg_duplicate_DW_tag_variable;
-}
+ check_duplicate_DW_tag_variable (checkstack &, dwarflint &) {}
-check_duplicate_DW_tag_variable
-::check_duplicate_DW_tag_variable (checkstack &stack, dwarflint &lint)
- : highlevel_check<check_duplicate_DW_tag_variable> (stack, lint)
-{
- for (all_dies_iterator<dwarf> it = all_dies_iterator<dwarf> (dw);
- it != all_dies_iterator<dwarf> (); ++it)
+ virtual void
+ die (all_dies_iterator<dwarf> const &it)
{
dwarf::debug_info_entry::children_type const &children
= it->children ();
{
dwarf::debug_info_entry::attributes_type const &
attrs = jt->attributes ();
- dwarf::debug_info_entry::attributes_type::const_iterator
+ dwarf::debug_info_entry::attributes_type::const_iterator
at, et = attrs.end ();
if ((at = attrs.find (DW_AT_name)) == et)
continue;
}
}
}
+ };
+ reg_die_check<check_duplicate_DW_tag_variable> reg;
}