[patch][gold] Add some typedefs
Ian Lance Taylor
iant@google.com
Tue Nov 24 19:11:00 GMT 2009
Rafael Espindola <espindola@google.com> writes:
> 2009-11-24 Rafael Avila de Espindola <espindola@google.com>
>
> * incremental.cc (Incremental_inputs_header,
> Incremental_inputs_header_write, Incremental_inputs_entry,
> Incremental_inputs_entry_write): Add a typedef with the data type.
> template<int size, bool big_endian>
> class Incremental_inputs_header
> {
> + private:
> + typedef internal::Incremental_inputs_header_data data_type;
In gold, local types are always capitalized. So this should be
typedef internal::Incremental_inputs_header_data Data_type;
> + const data_type* p_;
In gold, the private data members always go at the bottom of the class
definition. You can change the definition of p_ to use the typedef,
but leave the definition at the bottom where it already is.
> template<int size, bool big_endian>
> class Incremental_inputs_header_write
> {
> + private:
> + typedef internal::Incremental_inputs_header_data data_type;
Capitalize data_type.
> + data_type* p_;
Keep p_ at the bottom of the class.
> @@ -155,12 +157,16 @@ class Incremental_inputs_header_write
> template<int size, bool big_endian>
> class Incremental_inputs_entry
> {
> + private:
> + typedef internal::Incremental_inputs_entry_data data_type;
Same.
> + const data_type* p_;
Same.
> @@ -195,12 +198,16 @@ class Incremental_inputs_entry
> template<int size, bool big_endian>
> class Incremental_inputs_entry_write
> {
> + private:
> + typedef internal::Incremental_inputs_entry_data data_type;
Same.
> + data_type* p_;
Same.
This is OK with those changes.
Thanks.
Ian
More information about the Binutils
mailing list