On Thu, Nov 3, 2016 at 10:39 AM, Mark Wielaard <m...@klomp.org> wrote: > > include/ChangeLog: > > 2016-11-03 David Tolnay <dtol...@gmail.com> > Mark Wielaard <m...@klomp.org> > > * demangle.h (DMGL_RUST): New macro. > (DMGL_STYLE_MASK): Add DMGL_RUST. > (demangling_styles): Add dlang_rust. > (RUST_DEMANGLING_STYLE_STRING): New macro. > (RUST_DEMANGLING): New macro. > (rust_demangle): New prototype. > (rust_is_mangled): Likewise. > (rust_demangle_sym): Likewise. > > libiberty/ChangeLog: > > 2016-11-03 David Tolnay <dtol...@gmail.com> > Mark Wielaard <m...@klomp.org> > > * Makefile.in (CFILES): Add rust-demangle.c. > (REQUIRED_OFILES): Add rust-demangle.o. > * cplus-dem.c (libiberty_demanglers): Add rust_demangling case. > (cplus_demangle): Handle RUST_DEMANGLING. > (rust_demangle): New function. > * rust-demangle.c: New file. > * testsuite/Makefile.in (really-check): Add check-rust-demangle. > (check-rust-demangle): New rule. > * testsuite/rust-demangle-expected: New file.
Are you completely confident that Rust mangling will never change to start requiring more space in the demangled string? If that could ever happen, you have chosen an unfortunate API. Has David Tolnay signed the FSF copyright agreement? I don't see him on the list. Other than that, this patch looks OK. Ian