1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Verify that the operand of a getresult instruction is a

call/invoke or undef.

llvm-svn: 50129
This commit is contained in:
Chris Lattner 2008-04-23 04:06:15 +00:00
parent be858fc296
commit bc7ea01b8a

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);
}