Verify that the operand of a getresult instruction is a

call/invoke or undef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-04-23 04:06:15 +00:00
parent 525af20937
commit 42369b7e4b

View File

@ -1081,8 +1081,14 @@ void Verifier::visitAllocationInst(AllocationInst &AI) {
}
void Verifier::visitGetResultInst(GetResultInst &GRI) {
Assert1(GRI.isValidOperands(GRI.getAggregateValue(), GRI.getIndex()),
Assert1(GetResultInst::isValidOperands(GRI.getAggregateValue(),
GRI.getIndex()),
"Invalid GetResultInst operands!", &GRI);
Assert1(isa<CallInst>(GRI.getAggregateValue()) ||
isa<InvokeInst>(GRI.getAggregateValue()) ||
isa<UndefValue>(GRI.getAggregateValue()),
"GetResultInst operand must be a call/invoke/undef!", &GRI);
visitInstruction(GRI);
}