Compiler projects using llvm
# In file 1 we set up some basic types and IDs to refer to them.  In this file
# we will set up the same types.  For some of them we will make them identical
# but re-order the records in the file to make sure they have different type
# indices and appear in different orders.  In other cases we will make slight
# adjustments to the types, to ensure that they do not get merged in.
# 
# For easy understanding, a semantic representation of the types we will set up
# is as follows:
#  - int main(int, char**)    // This record should share an LF_PROCEDURE and id
#                             // record with corresponding function from the
#                             // first file.
#  - int main2(int, char**)   // This record should share the LF_PROCEDURE
#                             // record but have a unique id record.
#  - void foo(int, char**)    // This record should have a unique LF_PROCEDURE
#                             // record, but the LF_ARGLIST record internally
#                             // should be shared.
#
#  - struct FooBar {          // Because the type of this record exactly matches
#                             // the corresponding file, its entire type record
#                             // hierarchy should be shared.
#    public:
#      void *FooMember;
#      void FooMethod2(int);  // Note that the *type* of this member should be
#                             // the same as the type of the record from the
#                             // first stream.  But since it has a different
#                             // name, it will not share an id record.
#    };
TpiStream:
  Records:
    # TypeIndex: 4096 (0x1000)
    # (int)
    - Kind:            LF_ARGLIST
      ArgList:         
        ArgIndices:      [ 116 ]
    # TypeIndex: 4097 (0x1001)
    # public void *FooMember
    - Kind:            LF_FIELDLIST
      FieldList:       
        - Kind:            LF_MEMBER
          DataMember:      
            Attrs:           3           # public
            Type:            1027        # void*
            FieldOffset:     0
            Name:            FooMember   # FooMember
    # TypeIndex: 4098 (0x1002)
    # char**
    - Kind:            LF_POINTER
      Pointer:         
        ReferentType:    1136
        Attrs:           32778
    # TypeIndex: 4099 (0x1003)
    # (int, char**)
    - Kind:            LF_ARGLIST
      ArgList:         
        ArgIndices:      [ 116, 4098 ]
    # TypeIndex: 4100 (0x1004)
    # struct FooBar {
    # public:
    #   void *FooMember;
    # };
    - Kind:            LF_STRUCTURE
      Class:           
        MemberCount:     1
        Options:         [ None, HasUniqueName ]
        FieldList:       4097
        Name:            FooBar
        UniqueName:      'FooBar'
        DerivationList:  0
        VTableShape:     0
        Size:            4
    # TypeIndex: 4101 (0x1005)
    # void (int, char**)
    - Kind:            LF_PROCEDURE
      Procedure:       
        ReturnType:      3           # void
        CallConv:        NearC
        Options:         [ None ]
        ParameterCount:  2
        ArgumentList:    4099        # (int, char**)
    # TypeIndex: 4102 (0x1006)
    # FooBar *
    - Kind:            LF_POINTER
      Pointer:         
        ReferentType:    4100       # FooBar
        Attrs:           32778
    # TypeIndex: 4103 (0x1007)
    # int (int, char**)
    - Kind:            LF_PROCEDURE
      Procedure:       
        ReturnType:      116         # int
        CallConv:        NearC
        Options:         [ None ]
        ParameterCount:  2
        ArgumentList:    4099        # (int, char**)
    # TypeIndex: 4104 (0x1008)
    - Kind:            LF_MFUNCTION
      MemberFunction:  
        ReturnType:      3                      # void
        ClassType:       4100                   # struct FooBar
        ThisType:        4102                   # FooBar *
        CallConv:        ThisCall
        Options:         [ None, Constructor ]
        ParameterCount:  1
        ArgumentList:    4096                   # (int)
        ThisPointerAdjustment: 0
IpiStream:
  Records:
    # TypeIndex: 4096 (0x1000)
    # struct FooBar
    - Kind:            LF_UDT_MOD_SRC_LINE
      UdtModSourceLine: 
        UDT:             4100       # struct FooBar
        SourceFile:      0          # We don't support this yet
        LineNumber:      0
        Module:          0          # We don't support this yet
    # TypeIndex: 4097 (0x1001)
    # int main2(int, char **)
    - Kind:            LF_FUNC_ID
      FuncId:          
        ParentScope:     0
        FunctionType:    4103       # int main2(int, char**)
        Name:            main2
    # TypeIndex: 4098 (0x1002)
    # void foo(int, char **)
    - Kind:            LF_FUNC_ID
      FuncId:          
        ParentScope:     0
        FunctionType:    4101       # void main2(int, char**)
        Name:            foo
    # TypeIndex: 4099 (0x1003)
    # void FooBar::FooMethod2(int)
    - Kind:            LF_MFUNC_ID
      MemberFuncId:    
        ClassType:       4100       # struct FooBar
        FunctionType:    4104       # void FooBar::FooMethod2(int)
        Name:            FooMethod2
    # TypeIndex: 4100 (0x1004)
    # int main(int, char **)
    - Kind:            LF_FUNC_ID
      FuncId:          
        ParentScope:     0
        FunctionType:    4103       # int main(int, char**)
        Name:            main