llvm/llvm/test/tools/dsymutil/Inputs/reflection_metadata.yaml

# How to generate this file:
# 1. First take a swift file and run xcrun swiftc -g -v file.swift 
# secondfile.swift, make sure the two swift files are in a short path like /tmp/

# 2. Now you can see what the driver does, generate the object files in the 
# tmp directory

# 3. Run obj2yaml on object file to create a yaml file

# 4. I ran delta to reduce this file.

--- !mach-o
FileHeader:
  magic:           0xFEEDFACF
  cputype:         0x1000007
  cpusubtype:      0x3
  filetype:        0x1
  ncmds:           8
  sizeofcmds:      3120
  flags:           0x2000
  reserved:        0x0
LoadCommands:
  - cmd:             LC_SEGMENT_64
    cmdsize:         2872
    segname:         ''
    vmaddr:          0
    vmsize:          21352
    fileoff:         2832
    filesize:        20967
    maxprot:         7
    initprot:        7
    nsects:          33
    flags:           0
    Sections:
      - sectname:        __text
        segname:         __TEXT
        addr:            0x0
        size:            4571
        offset:          0xC50
        align:           4
        reloff:          0x5CF8
        nreloc:          74
        flags:           0x80000400
        reserved1:       0x0
        reserved2:       0x0
        relocations:
          - address:         0x11A1
            symbolnum:       142
            pcrel:           true
            length:          2
            extern:          true
            type:            1
            scattered:       false
            value:           0
      - sectname:        __swift5_typeref
        segname:         __TEXT
        addr:            0x11DC
        size:            117
        offset:          0x1E2C
        align:           1
        reloff:          0x5F48
        nreloc:          22
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         7800423000005369000001FFFFFFFF002473346D61696E31304D7950726F746F636F6C50000001FFFFFFFF0001FFFFFFFF0001FFFFFFFF0001FFFFFFFF0035496E6E657201F9FFFFFF517A0001FFFFFFFF797847000001FFFFFFFF797847000001FFFFFFFF0001FFFFFFFF0001FFFFFFFF79784700
        relocations:
          - address:         0x6D
            symbolnum:       163
            pcrel:           false
            length:          2
            extern:          true
            type:            0
            scattered:       false
            value:           0
      - sectname:        __swift5_capture
        segname:         __TEXT
        addr:            0x1254
        size:            24
        offset:          0x1EA4
        align:           2
        reloff:          0x5FF8
        nreloc:          6
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         010000000100000002000000F4FFFFFFF0FFFFFFECFFFFFF
        relocations:
          - address:         0x14
            symbolnum:       29
            pcrel:           false
            length:          3
            extern:          true
            type:            0
            scattered:       false
            value:           0
      - sectname:        __swift5_reflstr
        segname:         __TEXT
        addr:            0x17D8
        size:            37
        offset:          0x2428
        align:           0
        reloff:          0x0
        nreloc:          0
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         496E6E65720069006D73006D6500696E6E6572004300490074006D6773006D676500474300
      - sectname:        __swift5_assocty
        segname:         __TEXT
        addr:            0x1800
        size:            24
        offset:          0x2450
        align:           2
        reloff:          0x6530
        nreloc:          8
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         00000000FCFFFFFF0100000008000000F0FFFFFFECFFFFFF
        relocations:
          - address:         0x14
            symbolnum:       31
            pcrel:           false
            length:          2
            extern:          true
            type:            5
            scattered:       false
            value:           0
      - sectname:        __swift5_fieldmd
        segname:         __TEXT
        addr:            0x1818
        size:            260
        offset:          0x2468
        align:           2
        reloff:          0x6570
        nreloc:          60
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         000000000000000004000C0000000000000000000000000001000C000300000000000000ECFFFFFFE8FFFFFF00000000E0FFFFFFDCFFFFFF00000000D4FFFFFFD0FFFFFF000000000000000000000C000100000002000000ECFFFFFFE8FFFFFF000000000000000000000C0000000000000000000000000003000C000200000000000000ECFFFFFFE8FFFFFF00000000E0FFFFFFDCFFFFFF000000000000000001000C000400000000000000ECFFFFFFE8FFFFFF00000000E0FFFFFFDCFFFFFF00000000D4FFFFFFD0FFFFFF00000000C8FFFFFFC4FFFFFF000000000000000000000C0000000000000000000000000002000C000100000000000000ECFFFFFFE8FFFFFF
        relocations:
          - address:         0x100
            symbolnum:       71
            pcrel:           false
            length:          2
            extern:          true
            type:            0
            scattered:       false
            value:           0
      - sectname:        __swift5_builtin
        segname:         __TEXT
        addr:            0x1AC8
        size:            20
        offset:          0x2718
        align:           2
        reloff:          0x67F8
        nreloc:          2
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         00000000090000000800010010000000FE000000
        relocations:
          - address:         0x0
            symbolnum:       52
            pcrel:           false
            length:          2
            extern:          true
            type:            5
            scattered:       false
            value:           0
      - sectname:        __swift5_proto
        segname:         __TEXT
        addr:            0x1AEC
        size:            10
        offset:          0x273C
        align:           2
        reloff:          0x0
        nreloc:          0
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         41424344454647484950
      - sectname:        __swift5_protos
        segname:         __TEXT
        addr:            0x1AF8
        size:            10
        offset:          0x2760
        align:           2
        reloff:          0x0
        nreloc:          0
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         51525354555657585960
      - sectname:        __swift5_acfuncs
        segname:         __TEXT
        addr:            0x1B04
        size:            10
        offset:          0x2784
        align:           2
        reloff:          0x0
        nreloc:          0
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         61626364656667686970
      - sectname:        __swift5_mpenum
        segname:         __TEXT
        addr:            0x1B10
        size:            10
        offset:          0x27A8
        align:           2
        reloff:          0x0
        nreloc:          0
        flags:           0x10000000
        reserved1:       0x0
        reserved2:       0x0
        content:         71727374757677787980
      - sectname:        __bss
        segname:         __DATA
        addr:            0x3372
        size:            2084
        offset:          0x5220
        align:           3
        reloff:          0x0
        nreloc:          0
        flags:           0x6800000B
        reserved1:       0x0
        reserved2:       0x0
        relocations:
          - address:         0x56
            symbolnum:       1
            pcrel:           false
            length:          3
            extern:          false
            type:            0
            scattered:       false
            value:           0
  - cmd:             LC_BUILD_VERSION
    cmdsize:         24
    platform:        1
    minos:           786432
    sdk:             786688
    ntools:          0
  - cmd:             LC_SYMTAB
    cmdsize:         24
    symoff:          27888
    nsyms:           185
    stroff:          30848
    strsize:         5056
  - cmd:             LC_DYSYMTAB
    cmdsize:         80
    ilocalsym:       0
    nlocalsym:       79
    iextdefsym:      79
    nextdefsym:      87
    iundefsym:       166
    nundefsym:       19
    tocoff:          0
    ntoc:            0
    modtaboff:       0
    nmodtab:         0
    extrefsymoff:    0
    nextrefsyms:     0
    indirectsymoff:  0
    nindirectsyms:   0
    extreloff:       0
    nextrel:         0
    locreloff:       0
    nlocrel:         0
  - cmd:             LC_LINKER_OPTION
    cmdsize:         40
    count:           1
    PayloadBytes:    [ 0x2D, 0x6C, 0x73, 0x77, 0x69, 0x66, 0x74, 0x53, 
                       0x0, 0x0, 0x0, 0x0 ]
  - cmd:             LC_LINKER_OPTION
    cmdsize:         24
    count:           1
    PayloadBytes:    [ 0x2D, 0x6C, 0x73, 0x77, 0x69, 0x66, 0x74, 0x43, 
                       0x6F, 0x72, 0x65, 0x0 ]
  - cmd:             LC_LINKER_OPTION
    cmdsize:         32
    count:           1
    PayloadBytes:    [ 0x2D, 0x6C, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5F, 
                       0x6E, 0x63, 0x79, 0x0 ]
  - cmd:             LC_LINKER_OPTION
    cmdsize:         24
    count:           1
    PayloadBytes:    [ 0x2D, 0x6C, 0x6F, 0x62, 0x6A, 0x63, 0x0, 0x0, 0x0, 
                       0x0, 0x0, 0x0 ]
LinkEditData:
  NameList:
    - n_strx:          5014
      n_type:          0xE
      n_sect:          1
      n_desc:          0
      n_value:         5600
  StringTable:
    - ''
    - l_objectdestroy
    - '_$s4main6MyEnumOWOy'
    - '_$s4main6MyEnumOwxx'
    - _symbolic x
    - '_$s4main6MyEnumOwst'
    - '_$s4main13MyGenericEnumOwst'
    - '_$s4main6MyEnumOwet'
    - '_$s4main13MyGenericEnumOwet'
    - '_OBJC_CLASS_$__TtCs12_SwiftObject'
    - '_OBJC_METACLASS_$__TtCs12_SwiftObject'
    - _swift_deallocObject
    - _swift_allocObject
    - '_$s4main11ConformanceV5innerSivs'
    - _swift_getAssociatedTypeWitness
    - __IVARS__TtC4main7MyClass
    - __DATA__TtC4main7MyClass
    - __METACLASS_DATA__TtC4main7MyClass
    - __IVARS__TtC4main14MyGenericClass
    - l_protocols
    - _objc_classes
    - l_protocol_conformances
    - l__swift5_reflection_descriptor
    - l_coro.devirt.trigger
    - '_$s4main14MyGenericClassCMr'
    - '_$s4main7MyClassC1i2ms2meACSi_AA0B6StructVAA0B4EnumOtcfCTq'
    - '_$s4main14MyGenericClassC1t1i3mgs3mgeACyxGx_5InnerQzAA0bC6StructVyxGAA0bC4EnumOyxGtcfCTq'
    - '_$s4main6MyEnumOwup'
    - '_$s4main13MyGenericEnumOwup'
    - '_$s4main6MyEnumOwcp'
    - '_$s4main10MyProtocolMp'
    - ___swift_reflection_version
    - ____chkstk_darwin
    - _swift_retain
    - '_$s4main8MyStructVMn'
    - '_$s4main15MyGenericStructVMn'
    - '_$s4main11ConformanceVMn'
    - '_$s4main6MyEnumOMn'
    - '_$s4main13MyGenericEnumOMn'
    - '_$s4main7MyClassCMn'
    - '_$s4main14MyGenericClassCMn'
    - '_$s4main7MyClassCMm'
    - '_$s5Inner4main10MyProtocolPTl'
    - '_$s4main6MyEnumOwui'
    - '_$s4main13MyGenericEnumOwui'
    - '_$s4main11ConformanceV5innerSivpfi'
    - _symbolic Si
    - '_$s4main15MyGenericStructVMi'
    - '_$s4main13MyGenericEnumOMi'
    - '_$s4main14MyGenericClassCMi'
    - l_llvm.swift_module_hash
    - '_$s4main13MyGenericEnumOyxGAA0B8ProtocolRzlWOh'
    - '_$s4main6MyEnumOWOh'
    - '_$s4main14MyGenericClassC1i5InnerQzvg'
    - '_$s4main14MyGenericClassC1txvg'
    - '_$s4main11ConformanceV5innerSivg'
    - '_$s4main7MyClassC1iSivg'
    - '_$s4main7MyClassC2msAA0B6StructVvg'
    - '_$s4main7MyClassC2meAA0B4EnumOvg'
    - '_$s4main14MyGenericClassC3mgsAA0bC6StructVyxGvg'
    - '_$s4main14MyGenericClassC3mgeAA0bC4EnumOyxGvg'
    - '_$s4main6MyEnumOwug'
    - '_$s4main13MyGenericEnumOwug'
    - ___swift_initWithCopy_strong
    - ___swift_assignWithCopy_strong
    - ___swift_destroy_strong
    - ___swift_assignWithTake_strong
    - _objc_opt_self
    - '_$s4main8MyStructVMf'
    - '_$s4main11ConformanceVMf'
    - '_$s4main6MyEnumOMf'
    - '_$s4main7MyClassCMf'
    - _swift_checkMetadataState
    - _swift_release
    - l_type_metadata_table
    - __objc_empty_cache
    - _swift_deallocClassInstance
    - ___chkstk_darwin_llvm_probe
    - '_$s4main6MyEnumOWOe'
    - '_$s4main7MyClassC1iSivpWvd'
    - '_$s4main7MyClassC2msAA0B6StructVvpWvd'
    - '_$s4main7MyClassC2meAA0B4EnumOvpWvd'
    - '_$s4main14MyGenericClassC3mgsAA0bC6StructVyxGvpWvd'
    - '_$s4main7MyClassCfd'
    - '_$s4main14MyGenericClassCfd'
    - '_$s4main7MyClassC1i2ms2meACSi_AA0B6StructVAA0B4EnumOtcfc'
    - '_$s4main14MyGenericClassC1t1i3mgs3mgeACyxGx_5InnerQzAA0bC6StructVyxGAA0bC4EnumOyxGtcfc'
    - '_$s4main11ConformanceVAA10MyProtocolAAMc'
    - '_$s4main6MyEnumOwta'
    - l_metadata
    - _swift_allocateGenericClassMetadata
    - _swift_allocateGenericValueMetadata
    - _swift_getGenericMetadata
    - ___swift_instantiateGenericMetadata
    - '_$s4main6MyEnumOwca'
    - '_$s4main8MyStructVMa'
    - '_$s4main15MyGenericStructVMa'
    - '_$s4main11ConformanceVMa'
    - '_$s4main6MyEnumOMa'
    - '_$s4main13MyGenericEnumOMa'
    - '_$s4main7MyClassCMa'
    - '_$s4main14MyGenericClassCMa'
    - '_$s4main16makeSomeClosures1tyycx_tAA10MyProtocolRzlFyycfU_'
    - '_$s4main11ConformanceV5innerACSi_tcfcfA_'
    - '_$s4main11ConformanceVAA10MyProtocolA2aDP5inner5InnerQzvgTW'
    - _symbolic _____ 4main8MyStructV
    - _symbolic _____ 4main15MyGenericStructV
    - _symbolic _____yxG 4main15MyGenericStructV
    - _symbolic _____ 4main11ConformanceV
    - '_$sytWV'
    - '_$sBoWV'
    - '_$sBi64_WV'
    - '_$s4main6MyEnumOWV'
    - '_$s4main13MyGenericEnumOWV'
    - '_$s4main11ConformanceV5innerSivpMV'
    - '_symbolic $s4main10MyProtocolP'
    - _symbolic 5Inner_____Qz 4main10MyProtocolP
    - '_$s4main11ConformanceVAA10MyProtocolAAWP'
    - '_$s4main15MyGenericStructVMP'
    - '_$s4main13MyGenericEnumOMP'
    - '_$s4main14MyGenericClassCMP'
    - '_$s4main6MyEnumOwCP'
    - _symbolic _____ 4main6MyEnumO
    - _symbolic _____ 4main13MyGenericEnumO
    - _symbolic _____yxG 4main13MyGenericEnumO
    - '_$s4main8MyStructVN'
    - '_$s4main11ConformanceVN'
    - '_$s4main6MyEnumON'
    - '_$s4main7MyClassCN'
    - '_$s4main11ConformanceV5innerSivM'
    - '_$s4mainMXM'
    - '_$s4main10MyProtocolTL'
    - '_$s4main15MyGenericStructVMI'
    - '_$s4main13MyGenericEnumOMI'
    - '_$s4main14MyGenericClassCMI'
    - '_$s4main16makeSomeClosures1tyycx_tAA10MyProtocolRzlF'
    - '_$s4main10MyProtocol_pMF'
    - '_$s4main8MyStructVMF'
    - '_$s4main15MyGenericStructVMF'
    - '_$s4main11ConformanceVMF'
    - '_$s4main6MyEnumOMF'
    - '_$s4main13MyGenericEnumOMF'
    - '_$s4main7MyClassCMF'
    - '_$s4main14MyGenericClassCMF'
    - '_$s4main7MyClassCfD'
    - '_$s4main14MyGenericClassCfD'
    - _symbolic _____ 4main7MyClassC
    - _symbolic _____ 4main14MyGenericClassC
    - _symbolic _____yxG 4main14MyGenericClassC
    - '_$s4main15MyGenericStructVACyxGycfC'
    - '_$s4main8MyStructVACycfC'
    - '_$s4main11ConformanceVACycfC'
    - '_$s4main11ConformanceV5innerACSi_tcfC'
    - '_$s4main7MyClassC1i2ms2meACSi_AA0B6StructVAA0B4EnumOtcfC'
    - '_$s4main14MyGenericClassC1t1i3mgs3mgeACyxGx_5InnerQzAA0bC6StructVyxGAA0bC4EnumOyxGtcfC'
    - '_$s4main6MyEnumOMB'
    - '_$s4main16makeSomeClosures1tyycx_tAA10MyProtocolRzlFyycfU_TA'
    - '_$s4main11ConformanceVAA10MyProtocolAAMA'
    - l___unnamed_29
    - l___unnamed_19
    - ___swift_memcpy9_8
    - ___swift_memcpy8_8
    - l___unnamed_28
    - l___unnamed_18
    - l___unnamed_27
    - l___unnamed_17
    - l___unnamed_26
    - l___unnamed_16
    - l___unnamed_25
    - l___unnamed_15
    - l___unnamed_4
    - l___unnamed_24
    - l___unnamed_14
    - l___unnamed_3
    - ___unnamed_23
    - l___unnamed_13
    - _swift_initClassMetadata2
    - l___unnamed_2
    - l___unnamed_12
    - l___unnamed_1
    - l___unnamed_11
    - _symbolic B0
    - l___unnamed_30
    - l___unnamed_10
    - '_$s4main11ConformanceV5innerSivM.resume.0'