summaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode/BitCodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Bitcode/BitCodes.h')
-rw-r--r--include/llvm/Bitcode/BitCodes.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Bitcode/BitCodes.h b/include/llvm/Bitcode/BitCodes.h
index 449dc35..28e1ab1 100644
--- a/include/llvm/Bitcode/BitCodes.h
+++ b/include/llvm/Bitcode/BitCodes.h
@@ -20,6 +20,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/ErrorHandling.h"
#include <cassert>
namespace llvm {
@@ -114,7 +115,6 @@ public:
bool hasEncodingData() const { return hasEncodingData(getEncoding()); }
static bool hasEncodingData(Encoding E) {
switch (E) {
- default: assert(0 && "Unknown encoding");
case Fixed:
case VBR:
return true;
@@ -123,6 +123,7 @@ public:
case Blob:
return false;
}
+ llvm_unreachable("Invalid encoding");
}
/// isChar6 - Return true if this character is legal in the Char6 encoding.
@@ -139,8 +140,7 @@ public:
if (C >= '0' && C <= '9') return C-'0'+26+26;
if (C == '.') return 62;
if (C == '_') return 63;
- assert(0 && "Not a value Char6 character!");
- return 0;
+ llvm_unreachable("Not a value Char6 character!");
}
static char DecodeChar6(unsigned V) {
@@ -150,17 +150,18 @@ public:
if (V < 26+26+10) return V-26-26+'0';
if (V == 62) return '.';
if (V == 63) return '_';
- assert(0 && "Not a value Char6 character!");
- return ' ';
+ llvm_unreachable("Not a value Char6 character!");
}
};
+template <> struct isPodLike<BitCodeAbbrevOp> { static const bool value=true; };
+
/// BitCodeAbbrev - This class represents an abbreviation record. An
/// abbreviation allows a complex record that has redundancy to be stored in a
/// specialized format instead of the fully-general, fully-vbr, format.
class BitCodeAbbrev {
- SmallVector<BitCodeAbbrevOp, 8> OperandList;
+ SmallVector<BitCodeAbbrevOp, 32> OperandList;
unsigned char RefCount; // Number of things using this.
~BitCodeAbbrev() {}
public:
OpenPOWER on IntegriCloud