gcc/include
David Tolnay 10d48c59b0 libiberty: Add Rust symbol demangling.
Adds Rust symbol demangler. Rust mangles symbols using GNU_V3 style,
adding a hash and various special character subtitutions. This adds
a new rust style to cplus_demangle and adds 3 helper functions
rust_demangle, rust_demangle_sym and rust_is_mangled.

rust-demangle.c was written by David. Mark did the code formatting to
GNU style and integration into the gcc/libiberty build system and
testsuite.

include/ChangeLog:

2016-11-03  David Tolnay <dtolnay@gmail.com>
           Mark Wielaard  <mark@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 <dtolnay@gmail.com>
           Mark Wielaard  <mark@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.

Co-Authored-By: Mark Wielaard <mark@klomp.org>

From-SVN: r242524
2016-11-16 23:09:27 +00:00
..
gdb Update copyright year in include 2015-07-14 09:08:59 -07:00
COPYING Update the address and phone number of the FSF organization. 2005-05-10 15:22:21 +00:00
COPYING3 COPYING_v3: New file. 2007-07-17 08:37:53 +00:00
ChangeLog libiberty: Add Rust symbol demangling. 2016-11-16 23:09:27 +00:00
ChangeLog-9103 Convert ChangeLog files to UTF-8. 2008-09-05 13:07:45 +02:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ansidecl.h FINAL/OVERRIDE: Define to empty on g++ < 4.7 2016-10-14 15:25:35 +00:00
demangle.h libiberty: Add Rust symbol demangling. 2016-11-16 23:09:27 +00:00
dwarf2.def dwarf2.h (enum dwarf_calling_convention): Add new DWARF5 calling convention codes. 2016-10-17 19:35:33 +02:00
dwarf2.h dwarf2.h (enum dwarf_calling_convention): Add new DWARF5 calling convention codes. 2016-10-17 19:35:33 +02:00
dyn-string.h Update copyright year in include 2015-07-14 09:08:59 -07:00
environ.h Fix PR63758 by using the _NSGetEnviron() API on Darwin 2015-10-18 10:33:37 +00:00
fibheap.h Update copyright year in include 2015-07-14 09:08:59 -07:00
filenames.h Update copyright year in include 2015-07-14 09:08:59 -07:00
floatformat.h Update copyright year in include 2015-07-14 09:08:59 -07:00
fnmatch.h Update copyright year in include 2015-07-14 09:08:59 -07:00
gcc-c-fe.def Update copyright year in include 2015-07-14 09:08:59 -07:00
gcc-c-interface.h Update copyright year in include 2015-07-14 09:08:59 -07:00
gcc-interface.h Update copyright year in include 2015-07-14 09:08:59 -07:00
getopt.h Update copyright year in include 2015-07-14 09:08:59 -07:00
gomp-constants.h gomp-constants.h (GOMP_VERSION): Increment to 1... 2016-05-26 09:12:59 +00:00
hashtab.h Update copyright year in include 2015-07-14 09:08:59 -07:00
leb128.h Update copyright year in include 2015-07-14 09:08:59 -07:00
libiberty.h libiberty.h (MAX_ALLOCA_SIZE): New macro. 2016-07-29 16:40:55 +00:00
longlong.h longlong.h (umul_ppmm): Remove SHMEDIA checks. 2016-04-29 10:44:57 +00:00
lto-symtab.h Update copyright year in include 2015-07-14 09:08:59 -07:00
md5.h Update copyright year in include 2015-07-14 09:08:59 -07:00
objalloc.h Update copyright year in include 2015-07-14 09:08:59 -07:00
obstack.h Modify obstack.[hc] to avoid having to include other gnulib files 2015-11-09 14:58:21 +10:30
partition.h partition.h (struct partition_elem): Re-order elements to avoid padding. 2015-03-19 11:44:08 +00:00
plugin-api.h Sync include/plugin-api.h with binutils. 2016-03-04 14:15:55 -08:00
safe-ctype.h Update copyright year in include 2015-07-14 09:08:59 -07:00
sha1.h Update copyright year in include 2015-07-14 09:08:59 -07:00
simple-object.h Update copyright year in include 2015-07-14 09:08:59 -07:00
sort.h Update copyright year in include 2015-07-14 09:08:59 -07:00
splay-tree.h Update copyright year in include 2015-07-14 09:08:59 -07:00
symcat.h Update copyright year in include 2015-07-14 09:08:59 -07:00
timeval-utils.h Update copyright year in include 2015-07-14 09:08:59 -07:00
vtv-change-permission.h Port libvtv to Solaris 2015-11-25 10:30:25 +00:00
xregex.h system.h [...]: Wrap C function declarations in extern "C". 2011-07-25 14:24:59 +00:00
xregex2.h Update copyright year in include 2015-07-14 09:08:59 -07:00
xtensa-config.h Update copyright year in include 2015-07-14 09:08:59 -07:00