mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
Simplify get_frame_unwind_table
This simplifies get_frame_unwind_table, changing it to use the registry 'emplace' method and to pass the initialization iterators to the constructor. This fixes a build problem on x86 -- reported by the auto-builder -- as a side effect. Tested-By: Guinevere Larsen <guinevere@redhat.com>
This commit is contained in:
parent
69c9ec4dc1
commit
d8c4a58b59
1 changed files with 4 additions and 9 deletions
|
|
@ -73,15 +73,10 @@ static std::vector<const frame_unwind *> &
|
|||
get_frame_unwind_table (struct gdbarch *gdbarch)
|
||||
{
|
||||
std::vector<const frame_unwind *> *table = frame_unwind_data.get (gdbarch);
|
||||
if (table != nullptr)
|
||||
return *table;
|
||||
|
||||
table = new std::vector<const frame_unwind *>;
|
||||
table->insert (table->begin (), standard_unwinders.begin (),
|
||||
standard_unwinders.end ());
|
||||
|
||||
frame_unwind_data.set (gdbarch, table);
|
||||
|
||||
if (table == nullptr)
|
||||
table = frame_unwind_data.emplace (gdbarch,
|
||||
standard_unwinders.begin (),
|
||||
standard_unwinders.end ());
|
||||
return *table;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue