aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
diff options
context:
space:
mode:
authorCharles Zablit <zablitcharles@gmail.com>2025-05-28 13:53:02 +0100
committerGitHub <noreply@github.com>2025-05-28 13:53:02 +0100
commitb8997c07d9783bbf81bf144b5982d43ba804f5ac (patch)
treed02d4dc0d91eb94970bf03a6df95b48a2a9869b0 /lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
parent9aebf4c399598e4f4a61ea5115bbfdfacfaa6ce9 (diff)
downloadllvm-b8997c07d9783bbf81bf144b5982d43ba804f5ac.zip
llvm-b8997c07d9783bbf81bf144b5982d43ba804f5ac.tar.gz
llvm-b8997c07d9783bbf81bf144b5982d43ba804f5ac.tar.bz2
[Demangling] Refactor Demangler range tracking (#140762)
This PR is a subset of the commits made in https://github.com/swiftlang/llvm-project/pull/10710. The most notable change is the addition of `PrefixRange` and `SuffixRange` which are a catch-all to track anything after or before a function's demangled name. In the case of Swift, this allows to add support for name highlighting without having to track the range of the scope and specifiers of a function (this will come in another PR).
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp')
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
index b178e06..7485577 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -401,8 +401,8 @@ GetDemangledFunctionSuffix(const SymbolContext &sc) {
if (!info->hasBasename())
return std::nullopt;
- return demangled_name.slice(info->QualifiersRange.second,
- llvm::StringRef::npos);
+ return demangled_name.slice(info->SuffixRange.first,
+ info->SuffixRange.second);
}
static bool PrintDemangledArgumentList(Stream &s, const SymbolContext &sc) {