diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp --- a/llvm/lib/Demangle/RustDemangle.cpp +++ b/llvm/lib/Demangle/RustDemangle.cpp @@ -203,7 +203,9 @@ } size_t Dot = Mangled.find('.'); Input = Mangled.substr(0, Dot); - StringView Suffix = Mangled.dropFront(Dot); + StringView Suffix; + if (Dot != StringView::npos) + Suffix = Mangled.substr(Dot); demanglePath(IsInType::No);