diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-23 04:06:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-23 04:06:15 +0000 |
commit | 42369b7e4be817f4cebfe9023648aab754cd226b (patch) | |
tree | b558e30668f62165fa82f00017b9ec950b4a6235 /lib | |
parent | 525af20937e0821f1405ea80ca41bb65d0a32933 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 5b8aa7691b..8a1b86f763 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -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); } |