summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-09-28 03:52:41 +0000
committerBill Wendling <isanbard@gmail.com>2011-09-28 03:52:41 +0000
commitbaf3941fde99332560c171d77f64554ad90ccf23 (patch)
tree63056a504aec345aa81deac2304e56d5cf5e4467 /llvm/lib/CodeGen
parent225e8481b021421bb807996ccea166f7cfe86833 (diff)
downloadbcm5719-llvm-baf3941fde99332560c171d77f64554ad90ccf23.tar.gz
bcm5719-llvm-baf3941fde99332560c171d77f64554ad90ccf23.zip
Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.
llvm-svn: 140678
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b2b93c9ff57..2bfb529a568 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -4757,7 +4757,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
case Intrinsic::eh_sjlj_functioncontext: {
// Get and store the index of the function context.
MachineFrameInfo *MFI = DAG.getMachineFunction().getFrameInfo();
- AllocaInst *FnCtx = cast<AllocaInst>(I.getArgOperand(0));
+ AllocaInst *FnCtx =
+ cast<AllocaInst>(I.getArgOperand(0)->stripPointerCasts());
int FI = FuncInfo.StaticAllocaMap[FnCtx];
MFI->setFunctionContextIndex(FI);
return 0;
OpenPOWER on IntegriCloud