[lldb/elf] Avoid side effects in function calls ParseUnwindSymbols

This addresses post-commit feedback to cd64273.
This commit is contained in:
Pavel Labath 2021-04-22 14:13:27 +02:00
parent 6ad7e87806
commit e5984a3680
1 changed files with 14 additions and 13 deletions

View File

@ -2918,8 +2918,9 @@ void ObjectFileELF::ParseUnwindSymbols(Symtab *symbol_table,
if (section_sp) {
addr_t offset = file_addr - section_sp->GetFileAddress();
const char *symbol_name = GetNextSyntheticSymbolName().GetCString();
uint64_t symbol_id = ++last_symbol_id;
Symbol eh_symbol(
++last_symbol_id, // Symbol table index.
symbol_id, // Symbol table index.
symbol_name, // Symbol name.
eSymbolTypeCode, // Type of this symbol.
true, // Is this globally visible?