1# To regenerate t1.obj and t2.obj, run the following: 2# $ cat t.cpp 3# #ifdef CONFIG1 4# struct A; 5# struct B { 6# A *a; 7# }; 8# int f(A *a); 9# int g(B *b) { return f(b->a); } 10# #else 11# struct B; 12# struct A { 13# B *b; 14# }; 15# int g(B *b); 16# int f(A *a) { return g(a->b); } 17# #endif 18# $ cl -c -DCONFIG1 -Z7 t.cpp -Fot1.obj && cl -c -Z7 t.cpp -Fot2.obj 19 20RUN: llvm-readobj -codeview %S/Inputs/codeview-merging-1.obj | FileCheck %s --check-prefix=OBJ1 21RUN: llvm-readobj -codeview %S/Inputs/codeview-merging-2.obj | FileCheck %s --check-prefix=OBJ2 22RUN: llvm-readobj -codeview-merged-types %S/Inputs/codeview-merging-1.obj %S/Inputs/codeview-merging-2.obj | FileCheck %s 23 24OBJ1: FuncId (0x100D) { 25OBJ1-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 26OBJ1-NEXT: ParentScope: 0x0 27OBJ1-NEXT: FunctionType: int (B*) (0x100C) 28OBJ1-NEXT: Name: g 29OBJ1-NEXT: } 30OBJ1-NEXT: FuncId (0x100E) { 31OBJ1-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 32OBJ1-NEXT: ParentScope: 0x0 33OBJ1-NEXT: FunctionType: int (A*) (0x1003) 34OBJ1-NEXT: Name: f 35OBJ1-NEXT: } 36OBJ1-NOT: FuncId 37 38OBJ2: FuncId (0x100D) { 39OBJ2-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 40OBJ2-NEXT: ParentScope: 0x0 41OBJ2-NEXT: FunctionType: int (A*) (0x100C) 42OBJ2-NEXT: Name: f 43OBJ2-NEXT: } 44 45OBJ2: FuncId (0x1069) { 46OBJ2-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 47OBJ2-NEXT: ParentScope: 0x0 48OBJ2-NEXT: FunctionType: int (B*) (0x1003) 49OBJ2-NEXT: Name: g 50OBJ2-NEXT: } 51OBJ2-NOT: FuncId 52 53CHECK: FuncId (0x100D) { 54CHECK-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 55CHECK-NEXT: ParentScope: 0x0 56CHECK-NEXT: FunctionType: int (B*) (0x100C) 57CHECK-NEXT: Name: g 58CHECK-NEXT: } 59CHECK-NEXT: FuncId (0x100E) { 60CHECK-NEXT: TypeLeafKind: LF_FUNC_ID (0x1601) 61CHECK-NEXT: ParentScope: 0x0 62CHECK-NEXT: FunctionType: int (A*) (0x1003) 63CHECK-NEXT: Name: f 64CHECK-NEXT: } 65CHECK-NOT: FuncId 66