demangler: Reorganize for module demangling
authorNathan Sidwell <nathan@acm.org>
Tue, 8 Mar 2022 18:53:39 +0000 (10:53 -0800)
committerNathan Sidwell <nathan@acm.org>
Wed, 18 May 2022 10:58:55 +0000 (03:58 -0700)
commit65851d65fb36e847a9b8ef3b0519f06d29865a14
tree47d29098e9f89fc6696255364f0f7e147ea726ec
parent86f64400a5692499856d41462461327b93f82b8d
demangler: Reorganize for module demangling

Module demangling requires some changes in how substitutions are
handled.  This adjusts things to make that possible.

libiberty/
* cp-demangle.c (d_name): Add SUBSTABLE parameter,
push substitution if requested. Adjust unscoped name handling.
(d_prefix): Reorder main loop. Adjust all calls.
(d_unqualified_name): Add SCOPE parameter, create qualified
name here. Adjust all calls.
(cplus_demangle_type): Do not handle 'S' here, leave all
to d_class_enum_type.
(d_class_enum_type): Add SUBSTABLE parameter.
libiberty/cp-demangle.c