diff options
Diffstat (limited to 'gcc/go/gofrontend/types.h')
-rw-r--r-- | gcc/go/gofrontend/types.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/types.h b/gcc/go/gofrontend/types.h index 928c593a919..ed01d9cdc38 100644 --- a/gcc/go/gofrontend/types.h +++ b/gcc/go/gofrontend/types.h @@ -1924,7 +1924,7 @@ class Struct_field { public: explicit Struct_field(const Typed_identifier& typed_identifier) - : typed_identifier_(typed_identifier), tag_(NULL) + : typed_identifier_(typed_identifier), tag_(NULL), is_imported_(false) { } // The field name. @@ -1935,6 +1935,10 @@ class Struct_field bool is_field_name(const std::string& name) const; + // Return whether this struct field is an unexported field named NAME. + bool + is_unexported_field_name(Gogo*, const std::string& name) const; + // Return whether this struct field is an embedded built-in type. bool is_embedded_builtin(Gogo*) const; @@ -1972,6 +1976,11 @@ class Struct_field set_tag(const std::string& tag) { this->tag_ = new std::string(tag); } + // Record that this field is defined in an imported struct. + void + set_is_imported() + { this->is_imported_ = true; } + // Set the type. This is only used in error cases. void set_type(Type* type) @@ -1982,6 +1991,8 @@ class Struct_field Typed_identifier typed_identifier_; // The field tag. This is NULL if the field has no tag. std::string* tag_; + // Whether this field is defined in an imported struct. + bool is_imported_; }; // A list of struct fields. |