[demangler] Initial support for the new Rust mangling scheme
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Mon, 3 May 2021 23:41:30 +0000 (16:41 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 3 May 2021 23:44:30 +0000 (16:44 -0700)
commit7310403e3cdf8a436f94770e1a1498db05d2d091
tree8662eb9d6e03c5e4e1fbd57c1373bfc02a9cdd51
parent73332d73e15f4fdf8e4240c585d0a334f23926f3
[demangler] Initial support for the new Rust mangling scheme

Add a demangling support for a small subset of a new Rust mangling
scheme, with complete support planned as a follow up work.

Intergate Rust demangling into llvm-cxxfilt and use llvm-cxxfilt for
end-to-end testing. The new Rust mangling scheme uses "_R" as a prefix,
which makes it easy to disambiguate it from other mangling schemes.

The public API is modeled after __cxa_demangle / llvm::itaniumDemangle,
since potential candidates for further integration use those.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D101444
llvm/include/llvm/Demangle/Demangle.h
llvm/include/llvm/Demangle/RustDemangle.h [new file with mode: 0644]
llvm/lib/Demangle/CMakeLists.txt
llvm/lib/Demangle/RustDemangle.cpp [new file with mode: 0644]
llvm/test/Demangle/rust.test [new file with mode: 0644]
llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
llvm/unittests/Demangle/CMakeLists.txt
llvm/unittests/Demangle/RustDemangleTest.cpp [new file with mode: 0644]