[llvm] r274309 - [pdb] Avoid reporting an error when the module symbol stream is empty
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 17:37:49 PDT 2016
Author: rnk
Date: Thu Jun 30 19:37:49 2016
New Revision: 274309
URL: http://llvm.org/viewvc/llvm-project?rev=274309&view=rev
Log:
[pdb] Avoid reporting an error when the module symbol stream is empty
Modified:
llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp?rev=274309&r1=274308&r2=274309&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp Thu Jun 30 19:37:49 2016
@@ -67,6 +67,9 @@ Error ModStream::reload() {
iterator_range<codeview::CVSymbolArray::Iterator>
ModStream::symbols(bool *HadError) const {
+ // It's OK if the stream is empty.
+ if (SymbolsSubstream.getUnderlyingStream().getLength() == 0)
+ return llvm::make_range(SymbolsSubstream.end(), SymbolsSubstream.end());
return llvm::make_range(SymbolsSubstream.begin(HadError),
SymbolsSubstream.end());
}
More information about the llvm-commits
mailing list