c86ffdd Cleanup some entry points in abg-fwd.h

Authored and Committed by Dodji Seketeli 8 years ago
    Cleanup some entry points in abg-fwd.h
    
    While looking at something else I came accross some interface cleanup
    opportunities, as usual.  This patch honours some of those
    opportunities.
    
    	* include/abg-fwd.h (add_decl_to_scope): Pass the scope smart
    	pointer by reference.
    	(is_member_type): pass the type smart pointer by reference.
    	(is_function_decl, is_pointer_type, is_reference_type)
    	(is_qualified_type, is_function_type, is_method_type)
    	(is_array_type): Take a type_or_decl base pointer, rather than
    	either a decl_base or type_base pointer.
    	* include/abg-ir.h (translation_unit::set_corpus): Take a pointer
    	to non-const corpus.
    	(translation_unit::get_corpus): Add a non-const overload.
    	(type_or_decl_base::get_corpus): Likewise.
    	(type_or_decl_base::set_translation_unit): Take a pointer to
    	non-corpus translation_unit.
    	(type_or_decl_base::get_translation_unit): Add a non-const
    	overload.
    	(scope_decl::{add_member_decl, insert_member_decl}): Pass the
    	member smart pointer by reference.
    	(scope_decl::remove_member_decl): Take a non-const smart pointer.
    	(class_decl::add_member_decl): Pass the decl smart pointer by
    	reference.
    	(is_method_decl): Take pointer or reference to type_or_decl_base
    	rather than function_decl.
    	* src/abg-ir.cc (translation_unit::priv::corpus): Make this a
    	pointer to non-const corpus.
    	(translation_unit::set_corpus): Take a pointer to non-const
    	corpus.
    	(translation_unit::get_corpus): Add a non-const overload.
    	(translation_unit::get_global_scope): Adjust.
    	(translation_unit::bind_function_type_life_time): Adjust.
    	(type_or_decl_base::translation_unit): Make this a pointer to
    	non-const translation_unit.
    	(type_or_decl_base::get_corpus): Likewise.
    	(type_or_decl_base::set_translation_unit): Take a pointer to
    	non-corpus translation_unit.
    	(type_or_decl_base::get_translation_unit): Add a non-const
    	overload.
    	(is_member_type): pass the type smart pointer by reference.
    	(scope_decl::{add_member_decl, insert_member_decl}): Take a
    	reference to the member decl smart pointer.  Adjust.
    	(class_decl::add_member_decl): Likewise.
    	(scope_decl::remove_member_decl): Take a non-const smart pointer.
    	(add_decl_to_scope): Pass the scope smart pointer by reference.
    	(is_decl, is_function_decl, is_pointer_type, is_reference_type)
    	(is_qualified_type, is_function_type, is_method_type)
    	(is_method_decl, is_array_type): Take a type_or_decl base pointer,
    	rather than either a decl_base or type_base pointer.
    
    Signed-off-by: Dodji Seketeli <dodji@redhat.com>
    
        
file modified
+24 -26
file modified
+22 -10
file modified
+103 -53