[lld] r369425 - [COFF] Print the file name on errors writing the pdb file

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 11:56:48 PDT 2019


Author: mstorsjo
Date: Tue Aug 20 11:56:48 2019
New Revision: 369425

URL: http://llvm.org/viewvc/llvm-project?rev=369425&view=rev
Log:
[COFF] Print the file name on errors writing the pdb file

This avoids confusing contextless error messages such as "No such file
or directory" if e.g. the pdb output file should be written to a
nonexistent directory. (This can happen with linkrepro scripts, at least
old ones.)

Differential Revision: https://reviews.llvm.org/D66466

Modified:
    lld/trunk/COFF/PDB.cpp

Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=369425&r1=369424&r2=369425&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Tue Aug 20 11:56:48 2019
@@ -1693,6 +1693,7 @@ void PDBLinker::addSections(ArrayRef<Out
 }
 
 void PDBLinker::commit(codeview::GUID *guid) {
+  ExitOnError exitOnErr((config->pdbPath + ": ").str());
   // Write to a file.
   exitOnErr(builder.commit(config->pdbPath, guid));
 }




More information about the llvm-commits mailing list