aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c5
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/merge.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index e439f04616af..cfcf627ab1af 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -816,6 +816,11 @@ die_enum_create(dwarf_t *dw, Dwarf_Die die, Dwarf_Off off, tdesc_t *tdp)
Dwarf_Unsigned uval;
Dwarf_Signed sval;
+ if (die_isdecl(dw, die)) {
+ tdp->t_type = FORWARD;
+ return;
+ }
+
debug(3, "die %llu: creating enum\n", off);
tdp->t_type = ENUM;
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
index 5b22a31140d7..3dc2ad0cbdad 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
@@ -338,7 +338,8 @@ fwd_equiv(tdesc_t *ctdp, tdesc_t *mtdp)
{
tdesc_t *defn = (ctdp->t_type == FORWARD ? mtdp : ctdp);
- return (defn->t_type == STRUCT || defn->t_type == UNION);
+ return (defn->t_type == STRUCT || defn->t_type == UNION ||
+ defn->t_type == ENUM);
}
static int