Remove an unnecessary null check from lookup_local_symbol

lookup_local_symbol checks whether 'function' is null before calling
block::inlined_p, but this is not necessary.
This commit is contained in:
Tom Tromey
2024-05-23 09:35:57 -06:00
parent 67554fb777
commit b2cb4b4005

View File

@@ -2251,7 +2251,7 @@ lookup_local_symbol (const char *name,
return blocksym;
}
if (function != nullptr && block->inlined_p ())
if (block->inlined_p ())
break;
block = block->superblock ();
}