summaryrefslogtreecommitdiff
path: root/lib
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
commitadbf7b2c567d42fcb12cfd69c2692da03d34d384 (patch)
tree8867700f20b7c315100d0db56795202740a0e50e /lib
parenteef108d5608c50742450a36ed6149e040b14a988 (diff)
downloadllvm-adbf7b2c567d42fcb12cfd69c2692da03d34d384.tar.gz
llvm-adbf7b2c567d42fcb12cfd69c2692da03d34d384.tar.bz2
llvm-adbf7b2c567d42fcb12cfd69c2692da03d34d384.tar.xz
Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b2b93c9ff5..2bfb529a56 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/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;