Fix buildbots.

llvm-svn: 305542
diff --git a/llvm/lib/Support/BinaryStreamWriter.cpp b/llvm/lib/Support/BinaryStreamWriter.cpp
index 9c47a5c..c427651 100644
--- a/llvm/lib/Support/BinaryStreamWriter.cpp
+++ b/llvm/lib/Support/BinaryStreamWriter.cpp
@@ -84,6 +84,7 @@
   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();
 }