@@ -643,13 +643,17 @@ class LLDBTypeInfoProvider : public swift::remote::TypeInfoProvider {
643
643
if (auto ti = m_runtime.lookupClangTypeInfo (clang_type))
644
644
return *ti;
645
645
646
+ auto &process = m_runtime.GetProcess ();
647
+ ExecutionContext exe_ctx;
648
+ process.CalculateExecutionContext (exe_ctx);
649
+ auto *exe_scope = exe_ctx.GetBestExecutionContextScope ();
646
650
// Build a TypeInfo for the Clang type.
647
- auto size = clang_type.GetByteSize (nullptr );
648
- auto bit_align = clang_type.GetTypeBitAlign (nullptr );
651
+ auto size = clang_type.GetByteSize (exe_scope );
652
+ auto bit_align = clang_type.GetTypeBitAlign (exe_scope );
649
653
std::vector<swift::reflection::FieldInfo> fields;
650
654
if (clang_type.IsAggregateType ()) {
651
655
// Recursively collect TypeInfo records for all fields.
652
- for (uint32_t i = 0 , e = clang_type.GetNumFields (); i != e; ++i) {
656
+ for (uint32_t i = 0 , e = clang_type.GetNumFields (&exe_ctx ); i != e; ++i) {
653
657
std::string name;
654
658
uint64_t bit_offset_ptr = 0 ;
655
659
uint32_t bitfield_bit_size_ptr = 0 ;
@@ -2418,6 +2422,11 @@ void SwiftLanguageRuntimeImpl::DumpTyperef(
2418
2422
s->PutCString (string_stream.str ());
2419
2423
}
2420
2424
2425
+
2426
+ Process &SwiftLanguageRuntimeImpl::GetProcess () const {
2427
+ return m_process;
2428
+ }
2429
+
2421
2430
// Dynamic type resolution tends to want to generate scalar data - but there are
2422
2431
// caveats
2423
2432
// Per original comment here
0 commit comments