File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
lldb/source/Plugins/Language/Swift Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -1121,25 +1121,25 @@ bool lldb_private::formatters::swift::SIMDVector_SummaryProvider(
1121
1121
// dynamic archetype (and hence its size). Everything follows naturally
1122
1122
// as the elements are laid out in a contigous buffer without padding.
1123
1123
CompilerType simd_type = valobj.GetCompilerType ().GetCanonicalType ();
1124
+ auto ts = simd_type.GetTypeSystem ().dyn_cast_or_null <TypeSystemSwift>();
1125
+ if (!ts)
1126
+ return false ;
1127
+
1124
1128
ExecutionContext exe_ctx = valobj.GetExecutionContextRef ().Lock (true );
1125
1129
llvm::Optional<uint64_t > opt_type_size =
1126
1130
simd_type.GetByteSize (exe_ctx.GetBestExecutionContextScope ());
1127
1131
if (!opt_type_size)
1128
1132
return false ;
1129
1133
uint64_t type_size = *opt_type_size;
1130
1134
1131
- ::swift::TypeBase *swift_type = GetSwiftType (simd_type). getPointer ( );
1132
- if (!swift_type )
1135
+ lldbassert (simd_type. GetNumTemplateArguments () == 1 && " broken SIMD type " );
1136
+ if (simd_type. GetNumTemplateArguments () != 1 )
1133
1137
return false ;
1134
- auto bound_type = dyn_cast<::swift::BoundGenericType>(swift_type);
1135
- if (!bound_type)
1136
- return false ;
1137
- auto generic_args = bound_type->getGenericArgs ();
1138
- lldbassert (generic_args.size () == 1 && " broken SIMD type" );
1139
- if (generic_args.size () != 1 )
1138
+
1139
+ auto arg_type = ts->GetGenericArgumentType (simd_type.GetOpaqueQualType (), 0 );
1140
+ lldbassert (arg_type && " Unexpected invalid SIMD generic argument type" );
1141
+ if (!arg_type)
1140
1142
return false ;
1141
- auto swift_arg_type = generic_args[0 ];
1142
- CompilerType arg_type = ToCompilerType (swift_arg_type);
1143
1143
1144
1144
llvm::Optional<uint64_t > opt_arg_size =
1145
1145
arg_type.GetByteSize (exe_ctx.GetBestExecutionContextScope ());
You can’t perform that action at this time.
0 commit comments