diff options
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 51159c6..308986a 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1647,9 +1647,7 @@ Error BitcodeReader::parseAttributeGroupBlock() { } B.addAttribute(KindStr.str(), ValStr.str()); - } else { - assert((Record[i] == 5 || Record[i] == 6) && - "Invalid attribute group entry"); + } else if (Record[i] == 5 || Record[i] == 6) { bool HasType = Record[i] == 6; Attribute::AttrKind Kind; if (Error Err = parseAttrKind(Record[++i], &Kind)) @@ -1658,6 +1656,8 @@ Error BitcodeReader::parseAttributeGroupBlock() { return error("Not a type attribute"); B.addTypeAttr(Kind, HasType ? getTypeByID(Record[++i]) : nullptr); + } else { + return error("Invalid attribute group entry"); } } |