[LLD][COFF] Fix TypeServerSource matcher with more than one collision
[llvm-project.git] / lld / test / COFF / precomp-link-samename.test
blobf44abf289d867fc03b097888bbadff0d40e3f7d9
1 RUN: lld-link %S/Inputs/precompb/useprecomp.obj %S/Inputs/precompa/precomp.obj %S/Inputs/precompb/precomp.obj \
2 RUN:     %S/Inputs/precompa/useprecomp.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb /out:%t.exe  \
3 RUN:     /summary | FileCheck %s -check-prefix SUMMARY
5 RUN: llvm-pdbutil dump -types %t.pdb | FileCheck %s
8 CHECK: Types (TPI Stream)
9 CHECK-NOT: LF_PRECOMP
10 CHECK-NOT: LF_ENDPRECOMP
13 SUMMARY:                                     Summary
14 SUMMARY-NEXT: --------------------------------------------------------------------------------
15 SUMMARY-NEXT:               4 Input OBJ files (expanded from all cmd-line inputs)
16 SUMMARY-NEXT:               0 PDB type server dependencies
17 SUMMARY-NEXT:               2 Precomp OBJ dependencies
19 // precompa/precomp.cpp
20 #include "precomp.h"
22 // precompa/useprecomp.cpp
23 #include "precomp.h"
24 int main(int argc, char **argv) { return 0; }
26 // precompa/precomp.h
27 int precompa_symbol = 42;
29 // precompb/precomp.cpp
30 #include "precomp.h"
32 // precompb/useprecomp.cpp
33 #include "precomp.h"
35 // precompb/precomp.h
36 int precompb_symbol = 142;