summaryrefslogtreecommitdiffstats
path: root/dwarflint/tables.cc
diff options
context:
space:
mode:
authorPetr Machata <[email protected]>2010-09-22 16:23:39 +0200
committerPetr Machata <[email protected]>2010-09-22 16:23:39 +0200
commit4eec4fa552709e0677f5bcc1c8ab2baf907dd072 (patch)
tree3d3b0b9b741f93c36dc10c873a45eb7b8cd9e361 /dwarflint/tables.cc
parente8d64a0ffab2efe582f69de9bc8dbccb723b1853 (diff)
dwarflint: Getting rid of compat C bindings
Diffstat (limited to 'dwarflint/tables.cc')
-rw-r--r--dwarflint/tables.cc33
1 files changed, 7 insertions, 26 deletions
diff --git a/dwarflint/tables.cc b/dwarflint/tables.cc
index 82d4dd4b..a44f2a61 100644
--- a/dwarflint/tables.cc
+++ b/dwarflint/tables.cc
@@ -28,7 +28,6 @@
// a version in its own.
#include "tables.hh"
-#include "tables.h"
#include "../libdw/dwarf.h"
#include <map>
@@ -389,8 +388,8 @@ namespace
std_dwarf dwarf4 (dwarf_4_at_table, dwarf_4_form_table, &dwarf3);
}
-dwarf_version_h
-get_dwarf_version (unsigned version)
+dwarf_version const *
+dwarf_version::get (unsigned version)
{
switch (version)
{
@@ -401,34 +400,16 @@ get_dwarf_version (unsigned version)
};
}
-dwarf_version_h
-get_latest_dwarf_version ()
+dwarf_version const *
+dwarf_version::get_latest ()
{
- return &dwarf4;
-}
-
-bool
-dwver_form_valid (dwarf_version const *ver, int form)
-{
- return ver->form_allowed (form);
-}
-
-bool
-dwver_form_allowed (dwarf_version const *ver, int attr, int form)
-{
- return ver->form_allowed (attr, form);
-}
-
-bool
-dwver_form_allowed_in (dwarf_version const *ver, int attr, int form, int tag)
-{
- return ver->form_allowed (attr, form, tag);
+ return get (4);
}
int
-dwver_check_sibling_form (dwarf_version_h ver, int form)
+dwarf_version::check_sibling_form (int form) const
{
- if (!dwver_form_allowed (ver, DW_AT_sibling, form))
+ if (!form_allowed (DW_AT_sibling, form))
return -2;
else if (form == DW_FORM_ref_addr)
return -1;