diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-06-30 22:20:38 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-06-30 22:20:38 +0000 |
commit | e8c97a7cd7a2031eff606a63d99afd44a666adb3 (patch) | |
tree | 029c6a6cc2dc84143bdcb12c6f36aa2a3dc3f27b /llvm/lib/CodeGen | |
parent | 6ea3fc5a9f8ab265fceb805a268cde636d522641 (diff) | |
download | bcm5719-llvm-e8c97a7cd7a2031eff606a63d99afd44a666adb3.tar.gz bcm5719-llvm-e8c97a7cd7a2031eff606a63d99afd44a666adb3.zip |
Handle array and vector typed parameters in sjljehprepare like we do
structs. rdar://8145832
llvm-svn: 107332
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SjLjEHPrepare.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp index f76eaf12782..e90869d600d 100644 --- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp +++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp @@ -205,15 +205,15 @@ splitLiveRangesAcrossInvokes(SmallVector<InvokeInst*,16> &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 { |