aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index d3de6e6..2e5f032 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4947,7 +4947,6 @@ static const char *dwarf_tag_name (unsigned);
static const char *dwarf_attr_name (unsigned);
static const char *dwarf_form_name (unsigned);
static tree decl_ultimate_origin (const_tree);
-static tree block_ultimate_origin (const_tree);
static tree decl_class_context (tree);
static void add_dwarf_attr (dw_die_ref, dw_attr_ref);
static inline enum dw_val_class AT_class (dw_attr_ref);
@@ -5772,51 +5771,6 @@ decl_ultimate_origin (const_tree decl)
return DECL_ABSTRACT_ORIGIN (decl);
}
-/* Determine the "ultimate origin" of a block. The block may be an inlined
- instance of an inlined instance of a block which is local to an inline
- function, so we have to trace all of the way back through the origin chain
- to find out what sort of node actually served as the original seed for the
- given block. */
-
-static tree
-block_ultimate_origin (const_tree block)
-{
- tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);
-
- /* output_inline_function sets BLOCK_ABSTRACT_ORIGIN for all the
- nodes in the function to point to themselves; ignore that if
- we're trying to output the abstract instance of this function. */
- if (BLOCK_ABSTRACT (block) && immediate_origin == block)
- return NULL_TREE;
-
- if (immediate_origin == NULL_TREE)
- return NULL_TREE;
- else
- {
- tree ret_val;
- tree lookahead = immediate_origin;
-
- do
- {
- ret_val = lookahead;
- lookahead = (TREE_CODE (ret_val) == BLOCK
- ? BLOCK_ABSTRACT_ORIGIN (ret_val) : NULL);
- }
- while (lookahead != NULL && lookahead != ret_val);
-
- /* The block's abstract origin chain may not be the *ultimate* origin of
- the block. It could lead to a DECL that has an abstract origin set.
- If so, we want that DECL's abstract origin (which is what DECL_ORIGIN
- will give us if it has one). Note that DECL's abstract origins are
- supposed to be the most distant ancestor (or so decl_ultimate_origin
- claims), so we don't need to loop following the DECL origins. */
- if (DECL_P (ret_val))
- return DECL_ORIGIN (ret_val);
-
- return ret_val;
- }
-}
-
/* Get the class to which DECL belongs, if any. In g++, the DECL_CONTEXT
of a virtual function may refer to a base class, so we check the 'this'
parameter. */