File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1485,6 +1485,11 @@ bool SwiftLanguageRuntimeImpl::ForEachSuperClassType(
1485
1485
auto *reflection_ctx = GetReflectionContext ();
1486
1486
if (!reflection_ctx)
1487
1487
return false ;
1488
+ CompilerType instance_type = instance.GetCompilerType ();
1489
+ auto *ts =
1490
+ llvm::dyn_cast_or_null<TypeSystemSwift>(instance_type.GetTypeSystem ());
1491
+ if (!ts)
1492
+ return false ;
1488
1493
1489
1494
lldb::addr_t pointer = instance.GetPointerValue ();
1490
1495
// Maybe this belongs into GetPointerValue, but on the other hand it
@@ -1494,7 +1499,7 @@ bool SwiftLanguageRuntimeImpl::ForEachSuperClassType(
1494
1499
// libReflection cannot tell up how many bits to strip from
1495
1500
// multi-payload enum values.
1496
1501
auto addr_deref =
1497
- FixupPointerValue (pointer, instance. GetCompilerType () );
1502
+ FixupPointerValue (pointer, instance_type );
1498
1503
pointer = addr_deref.first ;
1499
1504
if (addr_deref.second ) {
1500
1505
// This is a reference storage object.
@@ -1504,11 +1509,6 @@ bool SwiftLanguageRuntimeImpl::ForEachSuperClassType(
1504
1509
return false ;
1505
1510
}
1506
1511
1507
- auto *ts = llvm::dyn_cast_or_null<TypeSystemSwiftTypeRef>(
1508
- instance.GetCompilerType ().GetTypeSystem ());
1509
- if (!ts)
1510
- return false ;
1511
-
1512
1512
auto md_ptr = reflection_ctx->readMetadataFromInstance (pointer);
1513
1513
if (!md_ptr)
1514
1514
return false ;
You can’t perform that action at this time.
0 commit comments