From 12cf5d70e81d6f4f57830d7c1d5fc3516637ffdb Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 16 Mar 2015 22:03:50 +0000 Subject: Add testing for mismatched explicit type on a gep operator when loading from bitcode llvm-svn: 232427 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index dd42bdb5804..a95ceead54e 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1973,7 +1973,8 @@ std::error_code BitcodeReader::ParseConstants() { bitc::CST_CODE_CE_INBOUNDS_GEP); if (PointeeType && PointeeType != cast(V)->getSourceElementType()) - return Error("Invalid record"); + return Error("Explicit gep operator type does not match pointee type " + "of pointer operand"); break; } case bitc::CST_CODE_CE_SELECT: { // CE_SELECT: [opval#, opval#, opval#] -- cgit v1.2.3