[PATCH] D99981: [demangler] Support the new Rust mangling scheme (v0)
Tomasz Miąsko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 15:52:45 PDT 2021
tmiasko created this revision.
Herald added subscribers: JDevlieghere, hiraditya, mgorny.
Herald added a reviewer: jhenderson.
tmiasko updated this revision to Diff 335675.
tmiasko edited the summary of this revision.
tmiasko added a comment.
tmiasko published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
...
This patch implements a demangling support for symbols using new Rust
mangling scheme (v0).
The Rust is currently migrating to this new scheme. The progress is
tracked in https://github.com/rust-lang/rust/issues/60705.
- The v0 mangling scheme uses "_R" as a prefix, which makes it easy to distinguish it from other mangling schemes.
- The public API is modeled after __cxa_demangle / llvm::itaniumDemangle, since potential candidates for further integration use those.
- The llvm-cxxfilt is extended to support Rust mangling and used to test the implementation.
- The llvm::demagle demangles Rust symbols, enabling llvm-objdump --demangle to do the same.
References (specification and relevant parts of implementation in Rust):
- https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html
- https://github.com/rust-lang/rust/pull/57967
- https://github.com/rust-lang/rust/pull/77554
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99981
Files:
llvm/include/llvm/Demangle/Demangle.h
llvm/include/llvm/Demangle/RustDemangle.h
llvm/include/llvm/Demangle/Utility.h
llvm/lib/Demangle/CMakeLists.txt
llvm/lib/Demangle/Demangle.cpp
llvm/lib/Demangle/RustDemangle.cpp
llvm/test/tools/llvm-cxxfilt/rust.test
llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
llvm/tools/llvm-rust-demangle-fuzzer/CMakeLists.txt
llvm/tools/llvm-rust-demangle-fuzzer/DummyDemanglerFuzzer.cpp
llvm/tools/llvm-rust-demangle-fuzzer/llvm-rust-demangle-fuzzer.cpp
llvm/unittests/Demangle/CMakeLists.txt
llvm/unittests/Demangle/DemangleTest.cpp
llvm/unittests/Demangle/RustDemangleTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99981.335675.patch
Type: text/x-patch
Size: 47994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210406/414a9cb8/attachment.bin>
More information about the llvm-commits
mailing list