[llvm] a84c65c - [Demangle][Rust] Parse slice type
Tomasz Miąsko via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 15:12:29 PDT 2021
Author: Tomasz Miąsko
Date: 2021-05-19T00:04:41+02:00
New Revision: a84c65c204ccbd2647eb567d1f7a9dca4ded977f
URL: https://github.com/llvm/llvm-project/commit/a84c65c204ccbd2647eb567d1f7a9dca4ded977f
DIFF: https://github.com/llvm/llvm-project/commit/a84c65c204ccbd2647eb567d1f7a9dca4ded977f.diff
LOG: [Demangle][Rust] Parse slice type
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D102578
Added:
Modified:
llvm/lib/Demangle/RustDemangle.cpp
llvm/test/Demangle/rust.test
Removed:
################################################################################
diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp
index 77aa4f7462a4..62f27ee9ecd5 100644
--- a/llvm/lib/Demangle/RustDemangle.cpp
+++ b/llvm/lib/Demangle/RustDemangle.cpp
@@ -436,6 +436,11 @@ void Demangler::demangleType() {
demangleConst();
print("]");
break;
+ case 'S':
+ print("[");
+ demangleType();
+ print("]");
+ break;
default:
Position = Start;
demanglePath(InType::Yes);
diff --git a/llvm/test/Demangle/rust.test b/llvm/test/Demangle/rust.test
index 388cab1907ff..5a2dc8f9a8a9 100644
--- a/llvm/test/Demangle/rust.test
+++ b/llvm/test/Demangle/rust.test
@@ -160,6 +160,9 @@ CHECK: named::<Name<>>
CHECK: types::<[u8; 0]>
_RIC5typesAhj0_E
+CHECK: types::<[_]>
+ _RIC5typesSpE
+
; Integer constants. Test value demangling.
CHECK: integer::<0>
More information about the llvm-commits
mailing list