diff options
Diffstat (limited to 'llvm/lib/Demangle/RustDemangle.cpp')
-rw-r--r-- | llvm/lib/Demangle/RustDemangle.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp index d6cf78b..04bc175 100644 --- a/llvm/lib/Demangle/RustDemangle.cpp +++ b/llvm/lib/Demangle/RustDemangle.cpp @@ -480,6 +480,17 @@ void Demangler::demangleType() { case 'F': demangleFnSig(); break; + case 'D': + demangleDynBounds(); + if (consumeIf('L')) { + if (auto Lifetime = parseBase62Number()) { + print(" + "); + printLifetime(Lifetime); + } + } else { + Error = true; + } + break; default: Position = Start; demanglePath(rust_demangle::InType::Yes); @@ -529,6 +540,16 @@ void Demangler::demangleFnSig() { } } +// <dyn-bounds> = [<binder>] {<dyn-trait>} "E" +void Demangler::demangleDynBounds() { + SwapAndRestore<size_t> SaveBoundLifetimes(BoundLifetimes, BoundLifetimes); + print("dyn "); + demangleOptionalBinder(); + // FIXME demangle {dyn-trait} + if (!consumeIf('E')) + Error = true; +} + // Demangles optional binder and updates the number of bound lifetimes. // // <binder> = "G" <base-62-number> |