mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Add testing for mismatched explicit type on a load instruction when loading from bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3648,9 +3648,9 @@ std::error_code BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
return EC;
|
||||
I = new LoadInst(Op, "", Record[OpNum+1], Align);
|
||||
|
||||
(void)Ty;
|
||||
assert((!Ty || Ty == I->getType()) &&
|
||||
"Explicit type doesn't match pointee type of the first operand");
|
||||
if (Ty && Ty != I->getType())
|
||||
return Error("Explicit load type does not match pointee type of "
|
||||
"pointer operand");
|
||||
|
||||
InstructionList.push_back(I);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user