summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Support/BinaryStreamWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/BinaryStreamWriter.cpp b/llvm/lib/Support/BinaryStreamWriter.cpp
index 9c47a5cf1f7..c4276518b19 100644
--- a/llvm/lib/Support/BinaryStreamWriter.cpp
+++ b/llvm/lib/Support/BinaryStreamWriter.cpp
@@ -84,6 +84,7 @@ Error BinaryStreamWriter::padToAlignment(uint32_t Align) {
if (NewOffset > getLength())
return make_error<BinaryStreamError>(stream_error_code::stream_too_short);
while (Offset < NewOffset)
- writeInteger('\0');
+ if (auto EC = writeInteger('\0'))
+ return EC;
return Error::success();
}
OpenPOWER on IntegriCloud