Make parseBitcodeFile return an ErrorOr<Module *>.
[oota-llvm.git] / include / llvm / Bitcode / BitstreamWriter.h
index a837211875f590e80e04927d3faffe124070fcf2..ef88a88a6cd8a50a2dd2437da38ebd7df01d625b 100644 (file)
@@ -97,7 +97,7 @@ public:
     : Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {}
 
   ~BitstreamWriter() {
-    assert(CurBit == 0 && "Unflused data remaining");
+    assert(CurBit == 0 && "Unflushed data remaining");
     assert(BlockScope.empty() && CurAbbrevs.empty() && "Block imbalance");
 
     // Free the BlockInfoRecords.
@@ -381,7 +381,8 @@ private:
           BlobData = 0;
         } else {
           for (unsigned e = Vals.size(); RecordIdx != e; ++RecordIdx) {
-            assert(Vals[RecordIdx] < 256 && "Value too large to emit as blob");
+            assert(isUInt<8>(Vals[RecordIdx]) &&
+                   "Value too large to emit as blob");
             WriteByte((unsigned char)Vals[RecordIdx]);
           }
         }