Fix uninitialized variable when looking up '_'.

From-SVN: r168158
This commit is contained in:
Ian Lance Taylor 2010-12-22 01:37:30 +00:00
parent 428f5f5f35
commit 5c63bac2ec
1 changed files with 3 additions and 3 deletions

View File

@ -415,6 +415,9 @@ Gogo::current_block()
Named_object*
Gogo::lookup(const std::string& name, Named_object** pfunction) const
{
if (pfunction != NULL)
*pfunction = NULL;
if (Gogo::is_sink_name(name))
return Named_object::make_sink();
@ -431,9 +434,6 @@ Gogo::lookup(const std::string& name, Named_object** pfunction) const
}
}
if (pfunction != NULL)
*pfunction = NULL;
if (this->package_ != NULL)
{
Named_object* ret = this->package_->bindings()->lookup(name);