File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
lldb/source/Plugins/LanguageRuntime/Swift Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -2451,20 +2451,19 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Value(
2451
2451
// If we couldn't find a load address, but the value object has a local
2452
2452
// buffer, use that.
2453
2453
if (val_address == LLDB_INVALID_ADDRESS && address_type == eAddressTypeHost) {
2454
- // Get the start and size of the local buffer.
2455
- auto start = in_value.GetValue ().GetScalar ().ULongLong ();
2456
- auto local_buffer_size = in_value.GetLocalBufferSize ();
2454
+ // Check if the dynamic type fits in the value object's buffer.
2455
+ auto in_value_buffer = in_value.GetLocalBuffer ();
2457
2456
2458
- // If we can't find the size of the local buffer we can't safely know if the
2457
+ // If we can't find the local buffer we can't safely know if the
2459
2458
// dynamic type fits in it.
2460
- if (local_buffer_size == LLDB_INVALID_ADDRESS )
2459
+ if (in_value_buffer. empty () )
2461
2460
return false ;
2462
2461
// If the dynamic type doesn't in the buffer we can't use it either.
2463
- if (local_buffer_size < bound_type.GetByteSize (exe_scope))
2462
+ if (in_value_buffer. size () < bound_type.GetByteSize (exe_scope))
2464
2463
return false ;
2465
2464
2466
2465
value_type = Value::GetValueTypeFromAddressType (address_type);
2467
- local_buffer = {( uint8_t *)start, local_buffer_size} ;
2466
+ local_buffer = in_value_buffer ;
2468
2467
return true ;
2469
2468
}
2470
2469
if (*size && (!val_address || val_address == LLDB_INVALID_ADDRESS))
You can’t perform that action at this time.
0 commit comments