From 12f3ca4cdb95b193af905a00e722a4dcb40b3de3 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 26 Apr 2017 19:45:00 +0000 Subject: Vendor import of llvm trunk r301441: https://llvm.org/svn/llvm-project/llvm/trunk@301441 --- utils/TableGen/Types.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'utils/TableGen/Types.cpp') diff --git a/utils/TableGen/Types.cpp b/utils/TableGen/Types.cpp index 35458296f8fd..04d9e40f6743 100644 --- a/utils/TableGen/Types.cpp +++ b/utils/TableGen/Types.cpp @@ -40,5 +40,6 @@ const char *llvm::getMinimalTypeForEnumBitfield(uint64_t Size) { uint64_t MaxIndex = Size; if (MaxIndex > 0) MaxIndex--; + assert(MaxIndex <= 64 && "Too many bits"); return getMinimalTypeForRange(1ULL << MaxIndex); } -- cgit v1.3