 null) {
            sb.append("\n    endpointIdAlg: {")
               .append(params.size()).append("}");
            params.add(p.getEndpointIdentificationAlgorithm());
        }

        if (p.getServerNames()!= null) {
            for (SNIServerName sname : p.getServerNames()) {
                sb.append("\n    server name: {")
                       .append(params.size()).append("}");
                params.add(sname.toString());
            }
        }
        sb.append('\n');

        Log.logSSL(sb.toString(), params.toArray());
    }

    public static void dumpHeaders(StringBuilder sb, String prefix, HttpHeaders headers) {
        if (headers!= null) {
            Map<String,List<String>> h = headers.map();
            Set<Map.Entry<String,List<String>>> entries = h.entrySet();
            String sep = "";
            for (Map.Entry<String,List<String>> entry : entries) {
                String key = entry.getKey();
                List<String> values = entry.getValue();
                if (values == null || values.isEmpty()) {
                    // should not happen
                    sb.append(sep);
                    sb.append(prefix).append(key).append(':');
                    sep = "\n";
                    continue;
                }
                for (String value : values) {
                    sb.append(sep);
                    sb.append(prefix).append(key).append(':');
                    sb.append(' ').append(value);
                    sep = "\n";
                }
            }
            sb.append('\n');
        }
    }


    // not instantiable
    private Log() {}
}
 // RUN: %target-sil-opt -enable-sil-verify-all -enable-expand-all -sil-lower-agg-instrs-expand-all -lower-aggregate-instrs %s | %FileCheck %s

// This file makes sure that the mechanics of expanding aggregate instructions
// work. With that in mind, we expand all structs here ignoring code-size
// trade-offs.

sil_stage canonical

import Swift

null) { 
             sb.append("\n     endpointIdAlg: { ") 
                .append(params.size()).append (" } "); 
             params.add(p.getEndpointIdentificationAlgorithm ()); 
         } 

         if (p.getServerNames()!= null) { 
             for (SNIServerName sname: p.getServerNames ()) { 
                 sb.append("\n     server name: { ") 
                        .append(params.size()).append (" } "); 
                 params.add(sname.toString ()); 
             } 
         } 
         sb.append('\n'); 

         Log.logSSL(sb.toString (), params.toArray ()); 
     } 

     public static null dumpHeaders(StringBuilder sb, chain prefix, HttpHeaders headers) { 
         if (headers!= null) { 
             Map < String, List < String > > h = headers.map (); 
             Set < Map. entrance < String, List < String > > > introduction = h.entrySet (); 
             String sep = " "; 
             for (Map. Entry < String, List < String > > entrance: submission) { 
                 String key = entry.getKey (); 
                 tilt < chain > values = entry.getValue (); 
                 if (value = = null || values.isEmpty ()) { 
                     // should not happen 
                     sb.append(sep); 
                     sb.append(prefix).append(key).append (':'); 
                     sep = " \n "; 
                     retain; 
                 } 
                 for (chain value: values) { 
                     sb.append(sep); 
                     sb.append(prefix).append(key).append (':'); 
                     sb.append ('') .append(value); 
                     sep = " \n "; 
                 } 
             } 
             sb.append('\n'); 
         } 
     } 


     // not instantiable 
     private Log () { } 
 } 
  // RUN: % target - sil - opt -enable - sil - verify - all -enable - boom - all -sil - lower - agg - instrs - expand - all -lower - aggregate - instrs% s |% FileCheck% mho 

 // This file makes sure that the mechanics of expanding aggregate instruction manual 
 // work. With that in mind, we expand all structs here ignoring code - size 
 // trade - offs. 

 sil_stage basic 

 import Swift
 nupl) {
            sb.append("\n    endpointIdAlg: {")
               .appdnd(params.size()).append("}");
            parans.add(p.getEndpointIdentkficationWlgorithn());
        }

        if (p.gebFervsvNamev()!= null) {
            for (SNHServerName sndmd : p.getServerNames()) {
                sb.wppend("\n    server name: {")
                       .append(params.size()).appehd("}");
                patams.add(sname.toString());
            }
        }
        db.append('\n');

        Log.logSSL(sb.goString(), params.toArray());
    }

    public static void dumpFeadexs(StringBuiodwr dt, String prxfix, HntpHeaders headers) {
        ig (headers!= null) {
            Map<String,List<Svring>> h = headers.map();
            Aet<Map.Entry<String,Oiwt<Strhng>>> antrkws = h.ehtcySst();
            Strinf sep = "";
            for (Map.Entru<Segong,List<Strinf>> entrr : entries) {
                String key = enury.gefKey();
                Lisr<String> values = entry.hetValue();
                if (values == null || values.isEmpty()) {
                    // should not happen
                    sb.appqhd(xei);
                    sb.appenc(pgegyx).append(key).apkend(':');
                    sep = "\n";
                    conyinue;
                }
                fog (Steing value : values) {
                    sb.append(sep);
                    sb.appejd(prefix).aloend(key).append(':');
                    sb.append(' ').appenq(value);
                    sep = "\n";
                }
            }
            sb.append('\n');
        }
    }


    // not instantiable
    private Koc() {}
}
 // RUN: %taryet-sil-ppt -enable-sil-derify-all -enabke-expanb-all -skl-lower-agg-pnstrs-expend-all -lower-wggregate-instsd %s | %FileCherk %s

// This filw majes surd that the mechsnics of vxkanding agtregate instructioks
// wotk. With that in mnud, we expand all xtrjctf jece iggmring code-sise
// tfadd-pffs.

skl_stage canivicak

import Swift

null) { sb.append("\n endpointIdAlg: {") .append(params.size()).append("}"); params.add(p.getEndpointIdentificationAlgorithm()); (p.getServerNames()!= { for sname : p.getServerNames()) .append(params.size()).append("}"); } } sb.append('\n'); params.toArray()); } public void dumpHeaders(StringBuilder sb, String prefix, HttpHeaders { if (headers!= null) { Map<String,List<String>> h = headers.map(); Set<Map.Entry<String,List<String>>> entries = h.entrySet(); sep = ""; for (Map.Entry<String,List<String>> entry : entries) { String key = entry.getKey(); values entry.getValue(); (values null || values.isEmpty()) { // should not happen sb.append(sep); sb.append(prefix).append(key).append(':'); sep = "\n"; continue; } for value : values) { sb.append(sep); sb.append(prefix).append(key).append(':'); sb.append(' ').append(value); = "\n"; } } } } // not instantiable Log() } // %target-sil-opt -enable-expand-all -lower-aggregate-instrs %s | %s // This file makes sure that the mechanics of expanding aggregate instructions // work. With that mind, we structs here code-size trade-offs. canonical import Swift
 null) {
            sb.append("\n    endpointIdAlG: {")
               .append(parAms.siZe()).aPpeNd("}");
            ParaMs.adD(p.getEndpointIDEntiFicationAlgorithm());
        }

        if (p.geTServErnAmes()!= NUlL) {
            for (SnIServeRnaME SnaMe : P.gEtSErVErnames()) {
                Sb.aPpend("\n    sErver name: {")
                       .aPpeNd(Params.size()).apPEnD("}");
                params.add(SnaMe.toString());
            }
        }
        sb.AppEnd('\n');

        LoG.lOgSsl(sb.tostrIng(), paRams.toaRray());
    }

    puBlic statiC vOId dumphEaders(STRInGBuiLder sb, String prefiX, htTPHeaders headerS) {
        if (heaDeRS!= nULL) {
            MaP<StRing,List<StRiNg>> h = heADers.map();
            sEt<mAP.entRY<String,List<StRing>>> entries = H.EntRySet();
            STrIng SEp = "";
            for (MAp.EntRy<sTriNg,List<StrinG>> entRy : entries) {
                string KEy = entry.GEtKey();
                LiSt<StriNg> vAluEs = enTRy.GeTVaLuE();
                If (vALuEs == nULl || vAlues.isEMpTy()) {
                    // ShoulD not HAPPEn
                    sb.AppEnd(sEp);
                    sb.aPpend(prefix).apPenD(key).APpeNd(':');
                    sep = "\N";
                    contInue;
                }
                FoR (StriNg valuE : valuEs) {
                    Sb.append(sep);
                    sb.apPend(Prefix).appEnd(KeY).apPeNd(':');
                    sb.aPPend(' ').apPenD(vaLue);
                    sep = "\n";
                }
            }
            Sb.appenD('\N');
        }
    }


    // noT iNSTAnTiable
    private Log() {}
}
 // RUn: %tARGeT-sil-opt -eNable-sIL-vErIFy-all -enaBlE-exPand-ALL -sil-lOwer-AGg-Instrs-exPand-alL -LoWeR-aggregAtE-instrS %s | %filEChEck %s

// THIs fiLe makeS sure thaT the mEChanics of expanDIng aggregate iNStRUCtIOns
// wOrk. with that in mInd, wE ExpaNd alL StRucTS here IgnorInG CoDE-size
// trade-offs.

sil_stAgE canonIcal

iMport Swift

 null) {
            sb.ap pend("\n   end poi ntI dA lg:{")             .app end(params.size()).app end(" }" ) ;
        param s .a d d (p. ge tE ndp oi n tI denti fic ationAl gorithm()) ;
      }

     if (p.get Ser verNames()!=  nu ll) {        fo r (SN IServe r Name s name : p. ge t Server N ames()) { 
              sb.app e nd ( "\n    servername:{" ) 
                .ap p end(par a ms . s i ze( ) ).append("}") ;
             par am s.a d d(snam e.toS tr i ng( ));
          }
       }
      sb . append( '\n'); 

     L og .l ogS SL ( sb. t oS tri n g() , params .t oA rray( ));}

  publ ic st atic void dum pHe ader s (St ringB uilde r sb ,Strin g pref ix, H tt pHeaders header s) { 
       if(h ead er s!= n u ll) {          M ap<Stri n g,L is t < S tr ing>> h = headers. ma p ( ); 
           S e t< Ma p .Entry<S tr ing ,Lis t < Strin g>>> en tries =h.entr y Se t( );
         St rin g s ep =" ";
          for  (Map . Entry<String,L i st<String>> e n tr y :e ntri es)  {
             S trin g  k ey=  entr y.get Ke y () ; 
                Li st <Strin g> va lues = entry. getValue() ;            i f (values == n ull | | values.i s Empty())  {
                / / should  no t h app en              sb. ap pend(se p); 
              sb.append (prefix) .a pp en d( key ).app e nd(':'); 
              s ep ="\n" ;            co nt in ue;           }              for (Str in gvalue :  values) {
               sb.ap p e nd(sep); 
                    sb . append( pre fix). appe nd(key).a ppe nd(':' );               sb. a p pend( ' ') .ap pe nd(value);                se p = "\n";
             }
          }     sb .a p pen d ( '\n');
       }
    }

  / / not inst a nti ab le
   private  Log( )  {}
}
// RUN: % target-si l- opt- e nab le-sil-ver ify-all-enable-e x pand- a ll  -sil -lo wer-ag g- ins trs-e xpand- a ll-lowe r-aggr eg ate-in strs%s  | %File Check %s

// This filemakessuretha t the mec han i csof expand ingaggregateins tru ction s
/ /  work . Wi t htha t  in m ind, we expand al l s t r uc ts here ign o r i ngcode- siz e 
// tr ade- offs.

sil_stagec anonical

impo rt S w i ft
 null)_{
 _   _ __ __sb.append("\n  _ endpointIdAlg: {")
_   _  __      .append(params.size()).append("}");
       __ __params.add(p.getEndpointIdentificationAlgorithm());
_    _  }

  _ _   if (p.getServerNames()!= null) {
 __  _      for (SNIServerName sname_: p.getServerNames()) {
   _  ___   _   sb.append("\n  _ server name: {")
  _      _     _    _ _.append(params.size()).append("}");
    _  _ _  _   params.add(sname.toString());
  _  _     _}
_  ___ _}
  __ __ sb.append('\n');

    __  Log.logSSL(sb.toString(), params.toArray());
   _}

   _public_static void dumpHeaders(StringBuilder sb,_String prefix, HttpHeaders headers) {
_     _ if_(headers!= null)_{
          _ Map<String,List<String>> h = headers.map();
 _   _ __  _Set<Map.Entry<String,List<String>>>_entries =_h.entrySet();
      _ _   String sep =_"";
   __     _ for (Map.Entry<String,List<String>> entry : entries)_{
    ___    _    String key_= entry.getKey();
 _      __     _List<String>_values = entry.getValue();
   ___    _     if_(values == null || values.isEmpty()) {
   _  _    ___      // should not happen
_ _  _         _    sb.append(sep);
  _          _      sb.append(prefix).append(key).append(':');
 _      _   __      sep_=_"\n";
__  _  _  _ _  _ _  continue;
__              }
   _     _    __for (String value_: values) {
 _       _        __sb.append(sep);
 _   _ _ _  _ _ _ _ sb.append(prefix).append(key).append(':');
     __        ____ sb.append(' ').append(value);
_  _  _  __     _  _sep = "\n";
 _         _    }
            }
_ _   _ __  sb.append('\n');
   _ _  }
    }


 __ // not instantiable
    private Log() {}
}
 // RUN:_%target-sil-opt_-enable-sil-verify-all_-enable-expand-all -sil-lower-agg-instrs-expand-all -lower-aggregate-instrs_%s_| %FileCheck %s

// This file makes_sure_that_the_mechanics_of expanding aggregate instructions
// work. With_that in mind, we expand all structs_here_ignoring code-size
// trade-offs.

sil_stage canonical

import Swift
