Commit 38ac6be7 by Ian Lance Taylor

Avoid endless loop checking whether type is pointer.

From-SVN: r168221
parent 4cc3ef61
......@@ -6853,6 +6853,19 @@ Named_type::do_verify()
return true;
}
// Return whether this type is or contains a pointer.
bool
Named_type::do_has_pointer() const
{
if (this->seen_ > 0)
return false;
++this->seen_;
bool ret = this->type_->has_pointer();
--this->seen_;
return ret;
}
// Return a hash code. This is used for method lookup. We simply
// hash on the name itself.
......
......@@ -2552,8 +2552,7 @@ class Named_type : public Type
do_verify();
bool
do_has_pointer() const
{ return this->type_->has_pointer(); }
do_has_pointer() const;
unsigned int
do_hash_for_method(Gogo*) const;
......@@ -2677,7 +2676,7 @@ class Forward_declaration_type : public Type
bool
do_has_pointer() const
{ return this->base()->has_pointer(); }
{ return this->real_type()->has_pointer(); }
unsigned int
do_hash_for_method(Gogo* gogo) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment