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 @@ -2457,20 +2457,19 @@ bool SwiftLanguageRuntime::GetDynamicTypeAndAddress_Value(
2457
2457
// If we couldn't find a load address, but the value object has a local
2458
2458
// buffer, use that.
2459
2459
if (val_address == LLDB_INVALID_ADDRESS && address_type == eAddressTypeHost) {
2460
- // Get the start and size of the local buffer.
2461
- auto start = in_value.GetValue ().GetScalar ().ULongLong ();
2462
- auto local_buffer_size = in_value.GetLocalBufferSize ();
2460
+ // Check if the dynamic type fits in the value object's buffer.
2461
+ auto in_value_buffer = in_value.GetLocalBuffer ();
2463
2462
2464
- // If we can't find the size of the local buffer we can't safely know if the
2463
+ // If we can't find the local buffer we can't safely know if the
2465
2464
// dynamic type fits in it.
2466
- if (local_buffer_size == LLDB_INVALID_ADDRESS )
2465
+ if (in_value_buffer. empty () )
2467
2466
return false ;
2468
2467
// If the dynamic type doesn't in the buffer we can't use it either.
2469
- if (local_buffer_size < bound_type.GetByteSize (exe_scope))
2468
+ if (in_value_buffer. size () < bound_type.GetByteSize (exe_scope))
2470
2469
return false ;
2471
2470
2472
2471
value_type = Value::GetValueTypeFromAddressType (address_type);
2473
- local_buffer = {( uint8_t *)start, local_buffer_size} ;
2472
+ local_buffer = in_value_buffer ;
2474
2473
return true ;
2475
2474
}
2476
2475
if (*size && (!val_address || val_address == LLDB_INVALID_ADDRESS))
You can’t perform that action at this time.
0 commit comments