diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-25 00:55:35 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-25 00:55:35 +0000 |
commit | f32b37002707734cb1a60b2d2aa9142615adbc23 (patch) | |
tree | eab3c0a2597a40c59a103891f915b0ff4e65c03c /gcc/go/gofrontend/types.h | |
parent | aa0371dffa848b5d29e5af9afd93f4ec8961e6f7 (diff) | |
download | gcc-f32b37002707734cb1a60b2d2aa9142615adbc23.tar.gz |
compiler: Don't use memcmp for equality if struct has trailing padding.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/gofrontend/types.h')
-rw-r--r-- | gcc/go/gofrontend/types.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h index cced68ddd68..a62a6cfbf97 100644 --- a/gcc/go/gofrontend/types.h +++ b/gcc/go/gofrontend/types.h @@ -576,7 +576,7 @@ class Type // identity function which gets nothing but a pointer to the value // and a size. bool - compare_is_identity(Gogo* gogo) const + compare_is_identity(Gogo* gogo) { return this->do_compare_is_identity(gogo); } // Return a hash code for this type for the method hash table. @@ -950,7 +950,7 @@ class Type { return false; } virtual bool - do_compare_is_identity(Gogo*) const = 0; + do_compare_is_identity(Gogo*) = 0; virtual unsigned int do_hash_for_method(Gogo*) const; @@ -1458,7 +1458,7 @@ class Integer_type : public Type protected: bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return true; } unsigned int @@ -1535,7 +1535,7 @@ class Float_type : public Type protected: bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } unsigned int @@ -1604,7 +1604,7 @@ class Complex_type : public Type protected: bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } unsigned int @@ -1664,7 +1664,7 @@ class String_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } Btype* @@ -1778,7 +1778,7 @@ class Function_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } unsigned int @@ -1853,7 +1853,7 @@ class Pointer_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return true; } unsigned int @@ -2139,7 +2139,7 @@ class Struct_type : public Type do_has_pointer() const; bool - do_compare_is_identity(Gogo*) const; + do_compare_is_identity(Gogo*); unsigned int do_hash_for_method(Gogo*) const; @@ -2272,7 +2272,7 @@ class Array_type : public Type } bool - do_compare_is_identity(Gogo*) const; + do_compare_is_identity(Gogo*); unsigned int do_hash_for_method(Gogo*) const; @@ -2365,7 +2365,7 @@ class Map_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } unsigned int @@ -2451,7 +2451,7 @@ class Channel_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return true; } unsigned int @@ -2582,7 +2582,7 @@ class Interface_type : public Type { return true; } bool - do_compare_is_identity(Gogo*) const + do_compare_is_identity(Gogo*) { return false; } unsigned int @@ -2865,7 +2865,7 @@ class Named_type : public Type do_has_pointer() const; bool - do_compare_is_identity(Gogo*) const; + do_compare_is_identity(Gogo*); unsigned int do_hash_for_method(Gogo*) const; @@ -2949,7 +2949,7 @@ class Named_type : public Type // function exits. mutable bool seen_; // Like seen_, but used only by do_compare_is_identity. - mutable bool seen_in_compare_is_identity_; + bool seen_in_compare_is_identity_; // Like seen_, but used only by do_get_backend. bool seen_in_get_backend_; }; @@ -3004,7 +3004,7 @@ class Forward_declaration_type : public Type { return this->real_type()->has_pointer(); } bool - do_compare_is_identity(Gogo* gogo) const + do_compare_is_identity(Gogo* gogo) { return this->real_type()->compare_is_identity(gogo); } unsigned int |