summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-30 22:22:59 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-30 22:22:59 +0000
commite74c78d53969fe2e28d7597f14018dbd7c0a1613 (patch)
tree8c9143121db8e681509d906c151348ea78d8bfec /llvm/lib/Transforms
parent4d92b64b8daf72fea499658d83381f45530ad68c (diff)
downloadbcm5719-llvm-e74c78d53969fe2e28d7597f14018dbd7c0a1613.tar.gz
bcm5719-llvm-e74c78d53969fe2e28d7597f14018dbd7c0a1613.zip
lowerinvoke needs to handle aggregate function args like sjlj eh does.
llvm-svn: 107335
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/LowerInvoke.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 2c90f93d8eb..2696e6913f3 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud