aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-02-21 02:14:01 +0000
committerDevang Patel <dpatel@apple.com>2008-02-21 02:14:01 +0000
commitdbcfb92ace78ecb95e5bb03bb7153b8f629fccc1 (patch)
tree5e63eaab6c1d58126fb437b8dca636411ba59a51 /lib/VMCore/Verifier.cpp
parentffcdab923c500951f71b3dc428a0119815dfaf0f (diff)
downloadexternal_llvm-dbcfb92ace78ecb95e5bb03bb7153b8f629fccc1.zip
external_llvm-dbcfb92ace78ecb95e5bb03bb7153b8f629fccc1.tar.gz
external_llvm-dbcfb92ace78ecb95e5bb03bb7153b8f629fccc1.tar.bz2
Let invoke return aggregate value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 27adc08..2eb306b 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1072,7 +1072,8 @@ void Verifier::visitInstruction(Instruction &I) {
// Check that the return value of the instruction is either void or a legal
// value type.
Assert1(I.getType() == Type::VoidTy || I.getType()->isFirstClassType()
- || (isa<CallInst>(I) && I.getType()->getTypeID() == Type::StructTyID),
+ || ((isa<CallInst>(I) || isa<InvokeInst>(I))
+ && I.getType()->getTypeID() == Type::StructTyID),
"Instruction returns a non-scalar type!", &I);
// Check that all uses of the instruction, if they are instructions
@@ -1096,7 +1097,7 @@ void Verifier::visitInstruction(Instruction &I) {
if (isa<ReturnInst>(I) || isa<GetResultInst>(I))
Assert1(I.getOperand(i)->getType()->getTypeID() == Type::StructTyID,
"Invalid ReturnInst operands!", &I);
- else if (isa<CallInst>(I)) {
+ else if (isa<CallInst>(I) || isa<InvokeInst>(I)) {
if (const PointerType *PT = dyn_cast<PointerType>
(I.getOperand(i)->getType())) {
const Type *ETy = PT->getElementType();