-27804ec53590e3644e030c9860822139a0cfb03f
+2118958321532352c91fd9406f571f8729a791cd
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
{
Location loc = Linemap::unknown_location();
bt = gogo->backend()->placeholder_pointer_type("", loc, false);
+ Pointer_type* pt = this->convert<Pointer_type, TYPE_POINTER>();
+ Type::placeholder_pointers.push_back(pt);
}
break;
Type::Pointer_type_table Type::pointer_types;
+// A list of placeholder pointer types. We keep this so we can ensure
+// they are finalized.
+
+std::vector<Pointer_type*> Type::placeholder_pointers;
+
// Make a pointer type.
Pointer_type*
void
Type::finish_pointer_types(Gogo* gogo)
{
- for (Pointer_type_table::const_iterator i = pointer_types.begin();
- i != pointer_types.end();
- ++i)
+ // We don't use begin() and end() because it is possible to add new
+ // placeholder pointer types as we finalized existing ones.
+ for (size_t i = 0; i < Type::placeholder_pointers.size(); i++)
{
- Pointer_type* pt = i->second;
+ Pointer_type* pt = Type::placeholder_pointers[i];
Type_btypes::iterator tbti = Type::type_btypes.find(pt);
if (tbti != Type::type_btypes.end() && tbti->second.is_placeholder)
{
static Pointer_type_table pointer_types;
+ // List of placeholder pointer types.
+ static std::vector<Pointer_type*> placeholder_pointers;
+
// The type classification.
Type_classification classification_;
// The backend representation of the type, once it has been