diff options
author | Dave Lee <davelee.com@gmail.com> | 2023-05-28 19:16:49 -0700 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2023-06-13 15:51:32 -0700 |
commit | a1a74f7cdea3db6e1a557eb1466f56b59e2d7fec (patch) | |
tree | a179f33fa1c3dee20e58e7c5ae761115679b80ba /lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp | |
parent | 53e33807860f3b48b6f409b186a3c76de5cf1bf8 (diff) | |
download | llvm-a1a74f7cdea3db6e1a557eb1466f56b59e2d7fec.zip llvm-a1a74f7cdea3db6e1a557eb1466f56b59e2d7fec.tar.gz llvm-a1a74f7cdea3db6e1a557eb1466f56b59e2d7fec.tar.bz2 |
[lldb] Default can_create to true in GetChildAtIndex (NFC)
Existing callers of `GetChildAtIndex` pass true for can_create. This change
makes true the default value, callers don't have to pass an opaque true.
See also D151966 for the same change to `GetChildMemberWithName`.
Differential Revision: https://reviews.llvm.org/D152031
Diffstat (limited to 'lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp')
-rw-r--r-- | lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp index 82e1275..585ab43 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp @@ -226,7 +226,7 @@ size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: break; case 2: { // Assume a post llvm r300140 __compressed_pair implementation: - ValueObjectSP first_elem_parent = m_item->GetChildAtIndex(0, true); + ValueObjectSP first_elem_parent = m_item->GetChildAtIndex(0); m_item = first_elem_parent->GetChildMemberWithName("__value_"); break; } @@ -394,15 +394,15 @@ lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::GetChildAtIndex( if (potential_child_sp) { switch (potential_child_sp->GetNumChildren()) { case 1: { - auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); + auto child0_sp = potential_child_sp->GetChildAtIndex(0); if (child0_sp && (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc)) potential_child_sp = child0_sp->Clone(ConstString(name.GetString())); break; } case 2: { - auto child0_sp = potential_child_sp->GetChildAtIndex(0, true); - auto child1_sp = potential_child_sp->GetChildAtIndex(1, true); + auto child0_sp = potential_child_sp->GetChildAtIndex(0); + auto child1_sp = potential_child_sp->GetChildAtIndex(1); if (child0_sp && (child0_sp->GetName() == g_cc_ || child0_sp->GetName() == g_cc) && child1_sp && child1_sp->GetName() == g_nc) |