On 9/18/24 10:04 AM, Jakub Jelinek wrote:
Hi!
Similarly to the previous patch, dwarf2asm.cc had
HAVE_DESIGNATED_INITIALIZERS support, and as fallback a huge switch.
The switch from what I can see is expanded as a jump table with 256
label pointers and code at those labels then loads addresses of
string literals.
The following patch instead uses a table with 256 const char * pointers,
NULL for ICE, non-NULL for returning something, similarly to the
HAVE_DESIGNATED_INITIALIZERS case.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2024-09-18 Jakub Jelinek <ja...@redhat.com>
* dwarf2asm.cc (eh_data_format_name): Use constexpr initialization
of format_names table for C++14 instead of a large switch.
Do we want to defer this while the discussion around moving to c++14
plays out? Or would you prefer to move forward and if we move to c++14
come back and simplify?
Jeff