[PATCH] D51559: [LLD][COFF] Cleanup error messages / add more coverage tests
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 31 14:12:35 PDT 2018
aganea created this revision.
aganea added reviewers: ruiu, zturner.
Herald added subscribers: llvm-commits, JDevlieghere, aprantl.
Changes summary:
1. Log the reason for a PDB load failure. The format looks like this:
lld-link: warning: Cannot use debug info for 'pdb-type-server-missing.yaml.tmp1.obj'
>>> failed to load reference 'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb': no such file or directory.
2. Properly handle out-of-date PDB signature by displaying a corresponding error:
lld-link: warning: Cannot use debug info for 'pdb-type-server-invalid-signature.yaml.tmp.obj'
>>> failed to load reference 'pdb-diff-cl.pdb': The signature does not match; the file(s) might be out of date.
3. Slightly change behavior on PDB failure: any subsequent load attempt from another OBJ would result in the same error message being logged:
lld-link: warning: Cannot use debug info for 'pdb-type-server-missing.yaml.tmp1.obj'
>>> failed to load reference 'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb': no such file or directory.
lld-link: warning: Cannot use debug info for 'pdb-type-server-missing.yaml.tmp2.obj'
>>> failed to load reference 'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb': no such file or directory.
4. Slightly change behavior on PDB failure: retry with filename only if previous error was `ENOENT` ("no such file or directory")
5. Tests: a. for native PDB errors; b. cover all the cases above.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D51559
Files:
COFF/PDB.cpp
test/COFF/Inputs/bad-block-size.pdb
test/COFF/Inputs/pdb-type-server-missing-2.yaml
test/COFF/Inputs/pdb-type-server-valid-signature.yaml
test/COFF/pdb-type-server-invalid-signature.yaml
test/COFF/pdb-type-server-missing.yaml
test/COFF/pdb-type-server-native-errors.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51559.163586.patch
Type: text/x-patch
Size: 20930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180831/787c0d0a/attachment.bin>
More information about the llvm-commits
mailing list