[Lldb-commits] [lldb] [lldb] add has methods to all DemangledNameInfo attributes (PR #144549)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 17 08:39:59 PDT 2025
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/144549
Add `hasX` methods to all the attributes of `DemangledNameInfo`.
>From 876fa6243e267b427df95ac01855173b366ec1e8 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Tue, 17 Jun 2025 16:38:45 +0100
Subject: [PATCH] [lldb] add has methods to all DemangledNameInfo attributes
---
lldb/include/lldb/Core/DemangledNameInfo.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lldb/include/lldb/Core/DemangledNameInfo.h b/lldb/include/lldb/Core/DemangledNameInfo.h
index 4b5ba5e42b3b1..a2f3fde90c611 100644
--- a/lldb/include/lldb/Core/DemangledNameInfo.h
+++ b/lldb/include/lldb/Core/DemangledNameInfo.h
@@ -73,6 +73,25 @@ struct DemangledNameInfo {
bool hasBasename() const {
return BasenameRange.second > BasenameRange.first;
}
+
+ /// Returns \c true if this object holds a valid scope range.
+ bool hasScope() const { return ScopeRange.second > ScopeRange.first; }
+
+ /// Returns \c true if this object holds a valid arguments range.
+ bool hasArguments() const {
+ return ArgumentsRange.second > ArgumentsRange.first;
+ }
+
+ /// Returns \c true if this object holds a valid qualifiers range.
+ bool hasQualifiers() const {
+ return QualifiersRange.second > QualifiersRange.first;
+ }
+
+ /// Returns \c true if this object holds a valid prefix range.
+ bool hasPrefix() const { return PrefixRange.second > PrefixRange.first; }
+
+ /// Returns \c true if this object holds a valid suffix range.
+ bool hasSuffix() const { return SuffixRange.second > SuffixRange.first; }
};
/// An OutputBuffer which keeps a record of where certain parts of a
More information about the lldb-commits
mailing list