[lld] [LLD][COFF] Add /nodbgdirmerge to control debug directory section (PR #159235)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 02:13:35 PDT 2025
================
@@ -0,0 +1,33 @@
+RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
+RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
+RUN: rm -f %t.dll %t.pdb
+
+## Check that it emits the debug directory in .cvinfo section when
+## /nodbgdirmerge is specified
+RUN: lld-link /debug /pdb:%t.pdb /pdbaltpath:test.pdb /dll /out:%t.dll \
+RUN: /entry:main /nodefaultlib /nodbgdirmerge %t1.obj %t2.obj
+RUN: llvm-readobj --sections %t.dll | FileCheck -check-prefix=CHECKNOTMERGED %s
+
+CHECKNOTMERGED: Section {
+CHECKNOTMERGED: Number: 3
+CHECKNOTMERGED-NEXT: Name: .cvinfo
+CHECKNOTMERGED-NEXT: VirtualSize: 0x3D
+CHECKNOTMERGED-NEXT: VirtualAddress: 0x3000
+CHECKNOTMERGED-NEXT: RawDataSize: 512
+CHECKNOTMERGED-NEXT: PointerToRawData: 0x800
+CHECKNOTMERGED-NEXT: PointerToRelocations: 0
+CHECKNOTMERGED-NEXT: PointerToLineNumbers: 0
+CHECKNOTMERGED-NEXT: RelocationCount: 0
+CHECKNOTMERGED-NEXT: LineNumberCount: 0
----------------
kkent030315 wrote:
We just need to check the presense of `.cvinfo` section and that's all, perhaps it should suffice we just have single line `CHECKNOTMERGED: Name: .cvinfo` as well as the negate test?
https://github.com/llvm/llvm-project/pull/159235
More information about the llvm-commits
mailing list