[llvm] r347690 - Add missing error checking code intended for r347687
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 27 11:14:11 PST 2018
Author: rnk
Date: Tue Nov 27 11:14:11 2018
New Revision: 347690
URL: http://llvm.org/viewvc/llvm-project?rev=347690&view=rev
Log:
Add missing error checking code intended for r347687
Modified:
llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp?rev=347690&r1=347689&r2=347690&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp Tue Nov 27 11:14:11 2018
@@ -154,8 +154,10 @@ Error DbiModuleDescriptorBuilder::commit
if (auto EC =
SymbolWriter.writeInteger<uint32_t>(COFF::DEBUG_SECTION_MAGIC))
return EC;
- for (ArrayRef<uint8_t> Syms : Symbols)
- SymbolWriter.writeBytes(Syms);
+ for (ArrayRef<uint8_t> Syms : Symbols) {
+ if (auto EC = SymbolWriter.writeBytes(Syms))
+ return EC;
+ }
assert(SymbolWriter.getOffset() % alignOf(CodeViewContainer::Pdb) == 0 &&
"Invalid debug section alignment!");
// TODO: Write C11 Line data
More information about the llvm-commits
mailing list