diff options
Diffstat (limited to 'llvm/lib/Demangle/RustDemangle.cpp')
-rw-r--r-- | llvm/lib/Demangle/RustDemangle.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp index 919a668..39db8fd 100644 --- a/llvm/lib/Demangle/RustDemangle.cpp +++ b/llvm/lib/Demangle/RustDemangle.cpp @@ -109,7 +109,9 @@ bool Demangler::demangle(StringView Mangled) { Error = true; return false; } - Input = Mangled; + size_t Dot = Mangled.find('.'); + Input = Mangled.substr(0, Dot); + StringView Suffix = Mangled.dropFront(Dot); demanglePath(rust_demangle::InType::No); @@ -121,6 +123,12 @@ bool Demangler::demangle(StringView Mangled) { if (Position != Input.size()) Error = true; + if (!Suffix.empty()) { + print(" ("); + print(Suffix); + print(")"); + } + return !Error; } |