@@ -3825,17 +3825,20 @@ namespace {
38253825 void printAnyFunctionTypeCommon (AnyFunctionType *T, StringRef label,
38263826 StringRef name) {
38273827 printCommon (label, name);
3828- SILFunctionType::Representation representation =
3829- T->getExtInfo ().getSILRepresentation ();
38303828
3831- if (representation != SILFunctionType::Representation::Thick)
3832- printField ( " representation" ,
3833- getSILFunctionTypeRepresentationString (representation) );
3829+ if (T-> hasExtInfo ()) {
3830+ SILFunctionType::Representation representation =
3831+ T-> getExtInfo (). getSILRepresentation ( );
38343832
3835- printFlag (!T->isNoEscape (), " escaping" );
3836- printFlag (T->isSendable (), " Sendable" );
3837- printFlag (T->isAsync (), " async" );
3838- printFlag (T->isThrowing (), " throws" );
3833+ if (representation != SILFunctionType::Representation::Thick) {
3834+ printField (" representation" ,
3835+ getSILFunctionTypeRepresentationString (representation));
3836+ }
3837+ printFlag (!T->isNoEscape (), " escaping" );
3838+ printFlag (T->isSendable (), " Sendable" );
3839+ printFlag (T->isAsync (), " async" );
3840+ printFlag (T->isThrowing (), " throws" );
3841+ }
38393842
38403843 if (Type globalActor = T->getGlobalActor ()) {
38413844 printField (" global_actor" , globalActor.getString ());
0 commit comments