mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Turn assertion into bitcode reading error
I don't think we test invalid bitcode records in any detail, so no test here - just a change for consistency with existing error checks in surrounding code. llvm-svn: 232215
This commit is contained in:
parent
ea5be8083a
commit
d92edb4bb2
@ -3126,8 +3126,8 @@ std::error_code BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
}
|
||||
|
||||
I = GetElementPtrInst::Create(BasePtr, GEPIdx);
|
||||
(void)Ty;
|
||||
assert(!Ty || Ty == cast<GetElementPtrInst>(I)->getSourceElementType());
|
||||
if (Ty && Ty != cast<GetElementPtrInst>(I)->getSourceElementType())
|
||||
return Error("Invalid record");
|
||||
InstructionList.push_back(I);
|
||||
if (InBounds)
|
||||
cast<GetElementPtrInst>(I)->setIsInBounds(true);
|
||||
|
Loading…
Reference in New Issue
Block a user