mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-12 19:46:53 +00:00
Fix style cleanups
* include/abg-ir.h (method_type::{method_type, set_class_type, get_type, set_type}): Use type_base_sptr and class_decl_sptr instead of the full non-typedefed name. (method_type):Do some cleanups in the definition of the convenience typedefs. * src/abg-ir.cc (method_type::{method_type, set_class_type, get_type, set_type}): Use type_base_sptr and class_decl_sptr instead of the full non-typedefed name. * src/abg-writer.cc (write_class_decl): Add a comment. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
1eecd89ee1
commit
421aa4ab5f
@ -2494,19 +2494,19 @@ public:
|
|||||||
/// Hasher for intances of method_type
|
/// Hasher for intances of method_type
|
||||||
struct hash;
|
struct hash;
|
||||||
|
|
||||||
method_type(shared_ptr<type_base> return_type,
|
method_type(type_base_sptr return_type,
|
||||||
shared_ptr<class_decl> class_type,
|
class_decl_sptr class_type,
|
||||||
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
||||||
size_t size_in_bits,
|
size_t size_in_bits,
|
||||||
size_t alignment_in_bits);
|
size_t alignment_in_bits);
|
||||||
|
|
||||||
method_type(shared_ptr<type_base> return_type,
|
method_type(type_base_sptr return_type,
|
||||||
shared_ptr<type_base> class_type,
|
type_base_sptr class_type,
|
||||||
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
||||||
size_t size_in_bits,
|
size_t size_in_bits,
|
||||||
size_t alignment_in_bits);
|
size_t alignment_in_bits);
|
||||||
|
|
||||||
method_type(shared_ptr<class_decl> class_type,
|
method_type(class_decl_sptr class_type,
|
||||||
size_t size_in_bits,
|
size_t size_in_bits,
|
||||||
size_t alignment_in_bits);
|
size_t alignment_in_bits);
|
||||||
|
|
||||||
@ -2518,7 +2518,7 @@ public:
|
|||||||
{return class_decl_sptr(class_type_);}
|
{return class_decl_sptr(class_type_);}
|
||||||
|
|
||||||
void
|
void
|
||||||
set_class_type(shared_ptr<class_decl> t);
|
set_class_type(class_decl_sptr t);
|
||||||
|
|
||||||
virtual string
|
virtual string
|
||||||
get_pretty_representation(bool internal = false) const;
|
get_pretty_representation(bool internal = false) const;
|
||||||
@ -2905,15 +2905,15 @@ public:
|
|||||||
/// Convenience typedef
|
/// Convenience typedef
|
||||||
/// @{
|
/// @{
|
||||||
typedef shared_ptr<base_spec> base_spec_sptr;
|
typedef shared_ptr<base_spec> base_spec_sptr;
|
||||||
typedef std::vector<base_spec_sptr> base_specs;
|
typedef vector<base_spec_sptr> base_specs;
|
||||||
typedef std::vector<type_base_sptr> member_types;
|
typedef vector<type_base_sptr> member_types;
|
||||||
typedef std::vector<var_decl_sptr> data_members;
|
typedef vector<var_decl_sptr> data_members;
|
||||||
typedef shared_ptr<method_decl> method_decl_sptr;
|
typedef shared_ptr<method_decl> method_decl_sptr;
|
||||||
typedef std::vector<method_decl_sptr> member_functions;
|
typedef vector<method_decl_sptr> member_functions;
|
||||||
typedef shared_ptr<member_function_template> member_function_template_sptr;
|
typedef shared_ptr<member_function_template> member_function_template_sptr;
|
||||||
typedef std::vector<member_function_template_sptr> member_function_templates;
|
typedef vector<member_function_template_sptr> member_function_templates;
|
||||||
typedef shared_ptr<member_class_template> member_class_template_sptr;
|
typedef shared_ptr<member_class_template> member_class_template_sptr;
|
||||||
typedef std::vector<member_class_template_sptr> member_class_templates;
|
typedef vector<member_class_template_sptr> member_class_templates;
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -3415,11 +3415,11 @@ public:
|
|||||||
|
|
||||||
/// @return the type of the current instance of the
|
/// @return the type of the current instance of the
|
||||||
/// class_decl::method_decl.
|
/// class_decl::method_decl.
|
||||||
const shared_ptr<method_type>
|
const method_type_sptr
|
||||||
get_type() const;
|
get_type() const;
|
||||||
|
|
||||||
void
|
void
|
||||||
set_type(shared_ptr<method_type> fn_type)
|
set_type(const method_type_sptr fn_type)
|
||||||
{function_decl::set_type(fn_type);}
|
{function_decl::set_type(fn_type);}
|
||||||
|
|
||||||
friend bool
|
friend bool
|
||||||
|
@ -9701,12 +9701,11 @@ function_type::~function_type()
|
|||||||
///
|
///
|
||||||
/// @param alignment_in_bits the alignment of an instance of
|
/// @param alignment_in_bits the alignment of an instance of
|
||||||
/// method_type, expressed in bits.
|
/// method_type, expressed in bits.
|
||||||
method_type::method_type
|
method_type::method_type (type_base_sptr return_type,
|
||||||
(shared_ptr<type_base> return_type,
|
class_decl_sptr class_type,
|
||||||
shared_ptr<class_decl> class_type,
|
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
||||||
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
size_t size_in_bits,
|
||||||
size_t size_in_bits,
|
size_t alignment_in_bits)
|
||||||
size_t alignment_in_bits)
|
|
||||||
: type_base(size_in_bits, alignment_in_bits),
|
: type_base(size_in_bits, alignment_in_bits),
|
||||||
function_type(return_type, parms, size_in_bits, alignment_in_bits)
|
function_type(return_type, parms, size_in_bits, alignment_in_bits)
|
||||||
{set_class_type(class_type);}
|
{set_class_type(class_type);}
|
||||||
@ -9730,9 +9729,8 @@ method_type::method_type
|
|||||||
///
|
///
|
||||||
/// @param alignment_in_bits the alignment of an instance of
|
/// @param alignment_in_bits the alignment of an instance of
|
||||||
/// method_type, expressed in bits.
|
/// method_type, expressed in bits.
|
||||||
|
method_type::method_type(type_base_sptr return_type,
|
||||||
method_type::method_type(shared_ptr<type_base> return_type,
|
type_base_sptr class_type,
|
||||||
shared_ptr<type_base> class_type,
|
|
||||||
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
const std::vector<shared_ptr<function_decl::parameter> >& parms,
|
||||||
size_t size_in_bits,
|
size_t size_in_bits,
|
||||||
size_t alignment_in_bits)
|
size_t alignment_in_bits)
|
||||||
|
@ -2443,6 +2443,8 @@ write_class_decl(const class_decl_sptr decl,
|
|||||||
{
|
{
|
||||||
function_decl_sptr fn = *f;
|
function_decl_sptr fn = *f;
|
||||||
if (get_member_function_is_virtual(fn))
|
if (get_member_function_is_virtual(fn))
|
||||||
|
// All virtual member functions are emitted together,
|
||||||
|
// later.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
assert(!get_member_function_is_virtual(fn));
|
assert(!get_member_function_is_virtual(fn));
|
||||||
|
Loading…
Reference in New Issue
Block a user