[PATCH] D102579: [Demangle][Rust] Parse tuples
Tomasz Miąsko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 16 07:04:02 PDT 2021
tmiasko created this revision.
tmiasko added a reviewer: dblaikie.
Herald added subscribers: JDevlieghere, hiraditya.
tmiasko requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Depends on D102578 <https://reviews.llvm.org/D102578>
Repository:
rG LLVM Github Monorepo
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
@@ -166,6 +166,18 @@
CHECK: types::<[u8]>
_RIC5typesShE
+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
@@ -439,6 +439,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;
+ }
case 'C':
case 'M':
case 'X':
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102579.345707.patch
Type: text/x-patch
Size: 1035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210516/50ac4c47/attachment.bin>
More information about the llvm-commits
mailing list