c++: rtti cleanups
authorNathan Sidwell <nathan@acm.org>
Tue, 3 Nov 2020 13:08:18 +0000 (05:08 -0800)
committerNathan Sidwell <nathan@acm.org>
Tue, 3 Nov 2020 13:16:31 +0000 (05:16 -0800)
commitfbc3f847438f2297c31d9eaaec5e662192acb779
tree4606279cbb1dc8de0467634e9bf7af68a6288343
parent918e8b10a716ec720215afafb7baa1b9b75e4fa1
c++: rtti cleanups

Here are a few cleanups from the modules branch.  Generally some RAII,
and a bit of lazy namespace pushing.

gcc/cp/
* rtti.c (init_rtti_processing): Move var decl to its init.
(get_tinfo_decl): Likewise.  Break out creation to called helper
...
(get_tinfo_decl_direct): ... here.
(build_dynamic_cast_1): Move var decls to their initializers.
(tinfo_base_init): Set decl's location to BUILTINS_LOCATION.
(get_tinfo_desc): Only push ABI namespace when needed.  Set type's
context.
gcc/cp/rtti.c