mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-19 12:51:22 +01:00
[taken from gcc-2.96]
2001-02-07 Alexandre Oliva <aoliva@redhat.com> * dwarf2out.c (gen_subprogram_die): Don't call add_abstract_origin_attribute if lookup_decl_die is NULL. 2001-02-07 Jakub Jelinek <jakub@redhat.com> * gcc.dg/20010207-1.c: New test. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9606 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
49d0b42456
commit
3516ced06b
@ -8359,7 +8359,16 @@ gen_subprogram_die (decl, context_die)
|
||||
if (origin != NULL)
|
||||
{
|
||||
subr_die = new_die (DW_TAG_subprogram, context_die);
|
||||
add_abstract_origin_attribute (subr_die, origin);
|
||||
/* lookup_decl_die (origin) may be NULL if decl is a copy of an
|
||||
implicit declaration of a function that was created while
|
||||
inlining a function that referenced the function without a
|
||||
prior declaration. Since we don't emit such implicit
|
||||
declarations in the first place, there's no point in linking
|
||||
this copy to it. Besides, add_abstract_origin_attribute()
|
||||
would crash. */
|
||||
if (TREE_CODE (origin) != FUNCTION_DECL
|
||||
|| lookup_decl_die (origin))
|
||||
add_abstract_origin_attribute (subr_die, origin);
|
||||
}
|
||||
else if (old_die && DECL_ABSTRACT (decl)
|
||||
&& get_AT_unsigned (old_die, DW_AT_inline))
|
||||
|
Loading…
x
Reference in New Issue
Block a user