Don't allow MCStreamer::EmitIntValue to output 0-byte integers.
[oota-llvm.git] / lib / MC / MCStreamer.cpp
index e7ee9e481bf6f0502b0a141f446a4ecd24cd402d..914e337267002c14fb07dfab4a41852979a08911 100644 (file)
@@ -72,7 +72,7 @@ void MCStreamer::generateCompactUnwindEncodings(MCAsmBackend *MAB) {
 /// EmitIntValue - Special case of EmitValue that avoids the client having to
 /// pass in a MCExpr for constant integers.
 void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size) {
-  assert(Size <= 8 && "Invalid size");
+  assert(1 <= Size && Size <= 8 && "Invalid size");
   assert((isUIntN(8 * Size, Value) || isIntN(8 * Size, Value)) &&
          "Invalid size");
   char buf[8];