aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 850eb55..b553775 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -22501,15 +22501,8 @@ dwarf2out_finish (const char *filename)
else if (TYPE_P (node->created_for))
context = TYPE_CONTEXT (node->created_for);
- gcc_assert (context
- && (TREE_CODE (context) == FUNCTION_DECL
- || TREE_CODE (context) == NAMESPACE_DECL));
-
- origin = lookup_decl_die (context);
- if (origin)
- add_child_die (origin, die);
- else
- add_child_die (comp_unit_die (), die);
+ origin = get_context_die (context);
+ add_child_die (origin, die);
}
}
}