[PATCH] D102579: [Demangle][Rust] Parse tuples
Tomasz Miąsko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 17 08:01:19 PDT 2021
tmiasko updated this revision to Diff 345884.
tmiasko marked 2 inline comments as done.
tmiasko added a comment.
Rebase
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.345884.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210517/a74f155f/attachment-0001.bin>
More information about the llvm-commits
mailing list