summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2017-05-17 20:46:48 +0000
committerBob Haarman <llvm@inglorion.net>2017-05-17 20:46:48 +0000
commitde33a637847a226da9d7439263b601a20f1de96e (patch)
tree448f74b70c3d492a82505f7ef13a106622c8c51c /llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
parent00549e47bdb77b7ba7dc8a685e1c2e974c6434e7 (diff)
downloadbcm5719-llvm-de33a637847a226da9d7439263b601a20f1de96e.tar.gz
bcm5719-llvm-de33a637847a226da9d7439263b601a20f1de96e.zip
[llvm-pdbdump] in yaml2pdb, generate default output filename if none given
Summary: llvm-pdbdump yaml2pdb used to fail with a misleading error message ("An I/O error occurred on the file system") if no output file was specified. This change adds an assert to PDBFileBuilder to check that an output file name is specified, and makes llvm-pdbdump generate an output file name based on the input file name if no output file name is explicitly specified. Reviewers: amccarth, zturner Reviewed By: zturner Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D33296 llvm-svn: 303299
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
index 4dd965c6907..c6568029ec5 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
@@ -117,6 +117,7 @@ Expected<uint32_t> PDBFileBuilder::getNamedStreamIndex(StringRef Name) const {
}
Error PDBFileBuilder::commit(StringRef Filename) {
+ assert(!Filename.empty());
auto ExpectedLayout = finalizeMsfLayout();
if (!ExpectedLayout)
return ExpectedLayout.takeError();
OpenPOWER on IntegriCloud