* src/abg-dwarf-reader.cc (build_function_decl): Change signature
to take function_decl to which one shall add properties that got
added by subsequent DIEs later.
(build_class_type_and_add_to_ir): Adjust.
(build_function_decl): Allow adding new properties to an existing
function_decl. Add the mangled name in particular.
* tests/data/test-read-dwarf/test1.abi: Update test.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
declare classes before defining them because both the declaration
and the definition now compare equal.
* tests/data/test-read-dwarf/test1.abi: Update test.
* tests/data/test-read-write/test20.xml: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* include/abg-ir.h (class_decl::is_struct_): New member.
(class_decl::class_decl): Take an additional is_struct member.
(class_decl::is_struct): New getter.
* src/abg-ir.cc (class_decl::class_decl): Initialize the new
is_struct_ data member.
(class_decl::get_pretty_representation): Tell struct and class
apart.
* abg-reader.cc (read_is_struct): New static function.
(build_class_decl): Capture the struct-ness of the class.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Likewise.
* src/abg-writer.cc (write_is_struct): New static function.
(write_class_decl): Write the struct-ness of the class.
* tests/data/test-read-dwarf/test1.abi: Update test.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-dwarf-reader.cc (die_is_artificial): New static
function.
(build_class_type_and_add_to_ir, build_ir_node_from_die): Use the
die_is_artificial function to test if the function DIE is
artificial and then skip it.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Insert
reference, pointers and qualified types at the point where we see
them, in their scope, rather than under the scope of their
underlying type. This is because their might be first declared as
member types and we don't want to loose that information.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* src/abg-dwarf-reader.cc (insert_decl_into_ir_under_scope)
(build_namespace_decl_and_add_to_ir, build_enum_type)
(build_class_type_and_add_to_ir, build_ir_node_from_die)
(build_ir_node_from_die): Remove.
* tests/data/test-read-dwarf/test0.abi: Update because now type
IDs can be used before they are defined.
* tests/data/test-read-dwarf/test1.abi: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
* tests/data/test-read-dwarf/test0.cc: Define a member function
out-of-line, outside of its namespace.
* tests/data/test-read-dwarf/test0.abi: Update the .abi file.
* tests/data/test-read-dwarf/test0: Update the resulting binary.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>