diff options
Diffstat (limited to 'lldb/source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormattersHelpers.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp index b2a5a17595c8f..7944ff06eee53 100644 --- a/lldb/source/DataFormatters/FormattersHelpers.cpp +++ b/lldb/source/DataFormatters/FormattersHelpers.cpp @@ -1,5 +1,4 @@ -//===-- FormattersHelpers.cpp -------------------------------------*- C++ -//-*-===// +//===-- FormattersHelpers.cpp ---------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -143,3 +142,14 @@ lldb_private::formatters::GetArrayAddressOrPointerValue(ValueObject &valobj) { return data_addr; } + +lldb::ValueObjectSP +lldb_private::formatters::GetValueOfLibCXXCompressedPair(ValueObject &pair) { + ValueObjectSP value = + pair.GetChildMemberWithName(ConstString("__value_"), true); + if (!value) { + // pre-r300140 member name + value = pair.GetChildMemberWithName(ConstString("__first_"), true); + } + return value; +} |