Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.

llvm-svn: 140678
This commit is contained in:
Bill Wendling 2011-09-28 03:52:41 +00:00
parent 225e8481b0
commit baf3941fde
1 changed files with 2 additions and 1 deletions

View File

@ -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;