When a function needs to be completed, we sometimes wrongly
try to de-duplicate rather than just complete it.
* src/abg-dwarf-reader.cc
(build_or_get_fn_decl_if_not_suppressed): Do try to de-duplicate a
function if it's to be completed.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
if (function_is_suppressed(ctxt, scope, fn_die))
return fn;
- if ((fn = is_function_decl(ctxt.lookup_artifact_from_die(fn_die,
- where_offset))))
- {
- ctxt.associate_die_to_decl(fn_die, fn, /*do_associate_by_repr=*/true);
- return fn;
- }
+ if (!result)
+ if ((fn = is_function_decl(ctxt.lookup_artifact_from_die(fn_die,
+ where_offset))))
+ {
+ ctxt.associate_die_to_decl(fn_die, fn, /*do_associate_by_repr=*/true);
+ return fn;
+ }
fn = build_function_decl(ctxt, fn_die, where_offset, result);