Skip to content

Commit

Permalink
[COFF] Print the file name on errors writing the pdb file
Browse files Browse the repository at this point in the history
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

llvm-svn: 369425
  • Loading branch information
mstorsjo committed Aug 20, 2019
1 parent 1271521 commit 8a91aa5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lld/COFF/PDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,7 @@ void PDBLinker::addSections(ArrayRef<OutputSection *> outputSections,
}

void PDBLinker::commit(codeview::GUID *guid) {
ExitOnError exitOnErr((config->pdbPath + ": ").str());
// Write to a file.
exitOnErr(builder.commit(config->pdbPath, guid));
}
Expand Down

0 comments on commit 8a91aa5

Please sign in to comment.