[PATCH] D102579: [Demangle][Rust] Parse tuples
Tomasz Miąsko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 15:12:50 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG774de7a09bee: [Demangle][Rust] Parse tuples (authored by tmiasko).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102579/new/
https://reviews.llvm.org/D102579
Files:
llvm/lib/Demangle/RustDemangle.cpp
llvm/test/Demangle/rust.test
Index: llvm/test/Demangle/rust.test
===================================================================
--- llvm/test/Demangle/rust.test
+++ llvm/test/Demangle/rust.test
@@ -163,6 +163,18 @@
CHECK: types::<[_]>
_RIC5typesSpE
+CHECK: types::<()>
+ _RIC5typesTEE
+
+CHECK: types::<(_,)>
+ _RIC5typesTpEE
+
+CHECK: types::<(_, _)>
+ _RIC5typesTppEE
+
+CHECK: types::<(_, _, _)>
+ _RIC5typesTpppEE
+
; Integer constants. Test value demangling.
CHECK: integer::<0>
Index: llvm/lib/Demangle/RustDemangle.cpp
===================================================================
--- llvm/lib/Demangle/RustDemangle.cpp
+++ llvm/lib/Demangle/RustDemangle.cpp
@@ -441,6 +441,19 @@
demangleType();
print("]");
break;
+ case 'T': {
+ print("(");
+ size_t I = 0;
+ for (; !Error && !consumeIf('E'); ++I) {
+ if (I > 0)
+ print(", ");
+ demangleType();
+ }
+ if (I == 1)
+ print(",");
+ print(")");
+ break;
+ }
default:
Position = Start;
demanglePath(InType::Yes);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102579.346284.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210518/71c88f8c/attachment.bin>
More information about the llvm-commits
mailing list