File tree 1 file changed +5
-2
lines changed
tools/swift-reflection-test
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -421,18 +421,21 @@ int doDumpHeapInstance(const char *BinaryFilename) {
421
421
return EXIT_SUCCESS ;
422
422
break ;
423
423
case Existential : {
424
+ static const char Name [] = "_TtP_" ;
424
425
swift_typeref_t AnyTR
425
- = swift_reflection_typeRefForMangledTypeName (RC , "_TtP_" , 5 );
426
+ = swift_reflection_typeRefForMangledTypeName (RC ,
427
+ Name , sizeof (Name )- 1 );
426
428
427
429
printf ("Reflecting an existential.\n" );
428
430
if (!reflectExistential (RC , Pipe , AnyTR ))
429
431
return EXIT_SUCCESS ;
430
432
break ;
431
433
}
432
434
case ErrorExistential : {
435
+ static const char ErrorName [] = "_TtPs5Error_" ;
433
436
swift_typeref_t ErrorTR
434
437
= swift_reflection_typeRefForMangledTypeName (RC ,
435
- "_TtPs5Error_" , 21 );
438
+ ErrorName , sizeof ( ErrorName ) - 1 );
436
439
printf ("Reflecting an error existential.\n" );
437
440
if (!reflectExistential (RC , Pipe , ErrorTR ))
438
441
return EXIT_SUCCESS ;
You can’t perform that action at this time.
0 commit comments