Don't allow NULL as an argument to block_static_block
block_static_block has special behavior when the block is NULL. Remove this and patch up the callers instead.
This commit is contained in:
parent
392c1cbd74
commit
7800409613
6 changed files with 30 additions and 11 deletions
|
@ -239,7 +239,9 @@ convert_symbol_sym (compile_cplus_instance *instance,
|
|||
}
|
||||
*/
|
||||
|
||||
const struct block *static_block = block_static_block (sym.block);
|
||||
const struct block *static_block = nullptr;
|
||||
if (sym.block != nullptr)
|
||||
static_block = block_static_block (sym.block);
|
||||
/* STATIC_BLOCK is NULL if FOUND_BLOCK is the global block. */
|
||||
bool is_local_symbol = (sym.block != static_block && static_block != nullptr);
|
||||
if (is_local_symbol)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue