diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-06-30 22:22:59 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-06-30 22:22:59 +0000 |
commit | 7fa1bbad2985e82f9af3bdc8a715a58762769992 (patch) | |
tree | 794b5814dee471b876cbc315fbd1f3459c5b53ec /lib/Transforms/Utils/LowerInvoke.cpp | |
parent | 0cd35f20bc0d46589e3cff7f30ab310572f35e6f (diff) |
lowerinvoke needs to handle aggregate function args like sjlj eh does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 2c90f93d8e..2696e6913f 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -310,15 +310,15 @@ splitLiveRangesLiveAcrossInvokes(SmallVectorImpl<InvokeInst*> &Invokes) { for (Function::arg_iterator AI = F->arg_begin(), E = F->arg_end(); AI != E; ++AI) { const Type *Ty = AI->getType(); - // StructType can't be cast, but is a legal argument type, so we have + // Aggregate types can't be cast, but are legal argument types, so we have // to handle them differently. We use an extract/insert pair as a // lightweight method to achieve the same goal. - if (isa<StructType>(Ty)) { - Instruction *EI = ExtractValueInst::Create(AI, 0, "", AfterAllocaInsertPt); + if (isa<StructType>(Ty) || isa<ArrayType>(Ty) || isa<VectorType>(Ty)) { + Instruction *EI = ExtractValueInst::Create(AI, 0, "",AfterAllocaInsertPt); Instruction *NI = InsertValueInst::Create(AI, EI, 0); NI->insertAfter(EI); AI->replaceAllUsesWith(NI); - // Set the struct operand of the instructions back to the AllocaInst. + // Set the operand of the instructions back to the AllocaInst. EI->setOperand(0, AI); NI->setOperand(0, AI); } else { |