Skip to content

Commit

Permalink
[Demangle][Rust] Parse trait definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiasko committed May 15, 2021
1 parent 9fa1380 commit f933f7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llvm/lib/Demangle/RustDemangle.cpp
Expand Up @@ -162,6 +162,14 @@ void Demangler::demanglePath() {
print(">");
break;
}
case 'Y': {
print("<");
demangleType();
print(" as ");
demanglePath();
print(">");
break;
}
case 'N': {
char NS = consume();
if (!isLower(NS) && !isUpper(NS)) {
Expand Down
5 changes: 5 additions & 0 deletions llvm/test/Demangle/rust.test
Expand Up @@ -49,6 +49,11 @@ CHECK: <_ as Clone>
CHECK: <_ as Clone>
_RXs_C5cratepC5Clone

; Trait definition

CHECK: <_ as Ord>
_RYpC3Ord

; Generic type arguments

CHECK: generic::<_>
Expand Down

0 comments on commit f933f7f

Please sign in to comment.