Canonicalize function types when reading from DWARF
authorDodji Seketeli <dodji@redhat.com>
Tue, 11 Oct 2016 13:08:13 +0000 (15:08 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 11 Oct 2016 13:12:42 +0000 (15:12 +0200)
Up until now, only function types pointed to by a pointer to function
was canonicalized.  This patch also canonicalizes function types that
are used as types for function declarations.

* src/abg-dwarf-reader.cc (build_function_decl): Canonicalize
function types.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc

index aeab809aae9bf469ab4722e90e4ee65c1a2259bd..c2f08cd24c08538a31ff23f3de9fca6e880f4f51 100644 (file)
@@ -9014,6 +9014,7 @@ build_function_decl(read_context& ctxt,
     {
       function_type_sptr fn_type(build_function_type(ctxt, die, is_method,
                                                     where_offset));
+      maybe_canonicalize_type(dwarf_dieoffset(die), source, ctxt);
 
       result.reset(is_method
                   ? new class_decl::method_decl(fname, fn_type,