[Lldb-commits] [lldb] 7fc583c - Change Get|SetNumChildren to use unint32_t
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 7 10:58:41 PST 2024
Author: Adrian Prantl
Date: 2024-03-07T10:58:34-08:00
New Revision: 7fc583c9a5ddf447b2b53007778cb034a186d4b5
URL: https://github.com/llvm/llvm-project/commit/7fc583c9a5ddf447b2b53007778cb034a186d4b5
DIFF: https://github.com/llvm/llvm-project/commit/7fc583c9a5ddf447b2b53007778cb034a186d4b5.diff
LOG: Change Get|SetNumChildren to use unint32_t
Added:
Modified:
lldb/include/lldb/Core/ValueObject.h
lldb/source/Core/ValueObject.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h
index 757ae0601c2466..b4d2c8098edc71 100644
--- a/lldb/include/lldb/Core/ValueObject.h
+++ b/lldb/include/lldb/Core/ValueObject.h
@@ -476,7 +476,7 @@ class ValueObject {
virtual size_t GetIndexOfChildWithName(llvm::StringRef name);
- size_t GetNumChildren(uint32_t max = UINT32_MAX);
+ uint32_t GetNumChildren(uint32_t max = UINT32_MAX);
const Value &GetValue() const { return m_value; }
@@ -960,7 +960,7 @@ class ValueObject {
/// Should only be called by ValueObject::GetNumChildren().
virtual uint32_t CalculateNumChildren(uint32_t max = UINT32_MAX) = 0;
- void SetNumChildren(size_t num_children);
+ void SetNumChildren(uint32_t num_children);
void SetValueDidChange(bool value_changed) {
m_flags.m_value_did_change = value_changed;
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index dcf7ccadef8801..0ed7f03be25c16 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -440,7 +440,7 @@ ValueObjectSP ValueObject::GetChildMemberWithName(llvm::StringRef name,
return child_sp;
}
-size_t ValueObject::GetNumChildren(uint32_t max) {
+uint32_t ValueObject::GetNumChildren(uint32_t max) {
UpdateValueIfNeeded();
if (max < UINT32_MAX) {
@@ -470,7 +470,7 @@ bool ValueObject::MightHaveChildren() {
}
// Should only be called by ValueObject::GetNumChildren()
-void ValueObject::SetNumChildren(size_t num_children) {
+void ValueObject::SetNumChildren(uint32_t num_children) {
m_flags.m_children_count_valid = true;
m_children.SetChildrenCount(num_children);
}
More information about the lldb-commits
mailing list