Skip to content

Commit 2317a72

Browse files
committed
[lldb] Add missing converstion to optional
1 parent bd64f31 commit 2317a72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/ValueObject/ValueObjectChild.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ bool ValueObjectChild::UpdateValue() {
164164
const bool thread_and_frame_only_if_stopped = true;
165165
ExecutionContext exe_ctx(GetExecutionContextRef().Lock(
166166
thread_and_frame_only_if_stopped));
167-
if (auto type_bit_size = GetCompilerType().GetBitSize(
168-
exe_ctx.GetBestExecutionContextScope())) {
167+
if (auto type_bit_size =
168+
llvm::expectedToOptional(GetCompilerType().GetBitSize(
169+
exe_ctx.GetBestExecutionContextScope()))) {
169170
uint64_t bitfield_end =
170171
m_bitfield_bit_size + m_bitfield_bit_offset;
171172
if (bitfield_end > *type_bit_size) {

0 commit comments

Comments
 (0)