1 # To regenerate t1.obj and t2.obj, run the following:
9 # int g(B *b) { return f(b->a); }
16 # int f(A *a) { return g(a->b); }
18 # $ cl -c -DCONFIG1 -Z7 t.cpp -Fot1.obj && cl -c -Z7 t.cpp -Fot2.obj
20 RUN: llvm-readobj --codeview %S/Inputs/codeview-merging-1.obj | FileCheck %s --check-prefix=OBJ1
21 RUN: llvm-readobj --codeview %S/Inputs/codeview-merging-2.obj | FileCheck %s --check-prefix=OBJ2
22 RUN: llvm-readobj --codeview-merged-types %S/Inputs/codeview-merging-1.obj %S/Inputs/codeview-merging-2.obj | FileCheck %s
24 OBJ1: Procedure ({{.*}}) {
25 OBJ1-NEXT: TypeLeafKind: LF_PROCEDURE (0x1008)
26 OBJ1-NEXT: ReturnType: int (0x74)
27 OBJ1-NEXT: CallingConvention: NearC (0x0)
28 OBJ1-NEXT: FunctionOptions [ (0x0)
30 OBJ1-NEXT: NumParameters: 1
31 OBJ1-NEXT: ArgListType: (A*) (0x1002)
33 OBJ1: FuncId (0x100D) {
34 OBJ1-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
35 OBJ1-NEXT: ParentScope: 0x0
36 OBJ1-NEXT: FunctionType: int (B*) (0x100C)
39 OBJ1-NEXT: FuncId (0x100E) {
40 OBJ1-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
41 OBJ1-NEXT: ParentScope: 0x0
42 OBJ1-NEXT: FunctionType: int (A*) (0x1003)
47 OBJ2: FuncId (0x100D) {
48 OBJ2-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
49 OBJ2-NEXT: ParentScope: 0x0
50 OBJ2-NEXT: FunctionType: int (A*) (0x100C)
54 OBJ2: FuncId (0x1069) {
55 OBJ2-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
56 OBJ2-NEXT: ParentScope: 0x0
57 OBJ2-NEXT: FunctionType: int (B*) (0x1003)
62 CHECK: MergedTypeStream [
63 CHECK: Procedure ({{.*}}) {
64 CHECK-NEXT: TypeLeafKind: LF_PROCEDURE (0x1008)
65 CHECK-NEXT: ReturnType: int (0x74)
66 CHECK-NEXT: CallingConvention: NearC (0x0)
67 CHECK-NEXT: FunctionOptions [ (0x0)
69 CHECK-NEXT: NumParameters: 1
70 CHECK-NEXT: ArgListType: (A*) (0x1002)
72 CHECK: Struct (0x1007) {
73 CHECK-NEXT: TypeLeafKind: LF_STRUCTURE (0x1505)
74 CHECK-NEXT: MemberCount: 1
75 CHECK-NEXT: Properties [ (0x200)
76 CHECK-NEXT: HasUniqueName (0x200)
78 CHECK-NEXT: FieldList: <field list> (0x1006)
79 CHECK-NEXT: DerivedFrom: 0x0
80 CHECK-NEXT: VShape: 0x0
83 CHECK-NEXT: LinkageName: .?AUB@@
87 CHECK: MergedIDStream [
88 CHECK-NEXT: StringId (0x1000) {
89 CHECK-NEXT: TypeLeafKind: LF_STRING_ID (0x1605)
91 CHECK-NEXT: StringData: d:\src\llvm\build\t.cpp
93 # Test that we contextually dump item ids and type ids from different databases.
94 CHECK-NEXT: UdtSourceLine (0x1001) {
95 CHECK-NEXT: TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
96 CHECK-NEXT: UDT: B (0x1007)
97 CHECK-NEXT: SourceFile: d:\src\llvm\build\t.cpp (0x1000)
98 CHECK-NEXT: LineNumber: 3
100 CHECK: FuncId (0x1002) {
101 CHECK-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
102 CHECK-NEXT: ParentScope: 0x0
103 CHECK-NEXT: FunctionType: int (B*)
106 CHECK-NEXT: FuncId (0x1003) {
107 CHECK-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601)
108 CHECK-NEXT: ParentScope: 0x0
109 CHECK-NEXT: FunctionType: int (A*)