summaryrefslogtreecommitdiff
path: root/src/dwarfcmp.cc
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-07-20 01:12:20 -0700
committerRoland McGrath <roland@redhat.com>2009-07-20 01:12:20 -0700
commit05b3993fba214828083bb21baf361ea43c7d9bea (patch)
tree50cfd812765b372715acc78a8455817398e17e32 /src/dwarfcmp.cc
parentce15f36336a26be1e3c10ccec5c0293bae33e5c9 (diff)
parentd966424b595fc17959d6ab408e9a5ae89fd1bbc4 (diff)
downloadelfutils-05b3993fba214828083bb21baf361ea43c7d9bea.tar.gz
Merge commit 'd966424' into dwarf
Conflicts: libdw/c++/dwarf_output libdw/c++/subr.hh
Diffstat (limited to 'src/dwarfcmp.cc')
-rw-r--r--src/dwarfcmp.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/dwarfcmp.cc b/src/dwarfcmp.cc
index 6ac78aab..6d3ee064 100644
--- a/src/dwarfcmp.cc
+++ b/src/dwarfcmp.cc
@@ -212,16 +212,26 @@ struct talker : public dwarf_ref_tracker<dwarf1, dwarf2>
}
};
+template<class dwarf1, class dwarf2, class tracker>
+struct cmp
+ : public dwarf_comparator<dwarf1, dwarf2, false, tracker>
+{
+ tracker _m_tracker;
+ inline cmp ()
+ : dwarf_comparator<dwarf1, dwarf2, false, tracker> (_m_tracker)
+ {}
+};
+
// For a silent comparison we just use the standard ref tracker.
template<class dwarf1, class dwarf2>
-struct quiet_cmp : public dwarf_comparator<dwarf1, dwarf2, false,
- dwarf_ref_tracker<dwarf1, dwarf2> >
+struct quiet_cmp
+ : public cmp<dwarf1, dwarf2, dwarf_ref_tracker<dwarf1, dwarf2> >
{};
// To be noisy, the talker wraps the standard tracker with verbosity hooks.
template<class dwarf1, class dwarf2>
-struct noisy_cmp : public dwarf_comparator<dwarf1, dwarf2, false,
- talker<dwarf1, dwarf2> >
+struct noisy_cmp
+ : public cmp<dwarf1, dwarf2, talker<dwarf1, dwarf2> >
{};