mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 14:16:59 +00:00
Parameter attributes on invoke calls were being lost due to the wrong
attribute index being used. Fix proposed by Anton Korobeynikov, who asked me to implement and commit it for him. This is PR1398. llvm-svn: 36906
This commit is contained in:
parent
f84f319401
commit
20a9ed0e20
@ -2787,10 +2787,12 @@ void SelectionDAGLowering::LowerCallTo(Instruction &I,
|
||||
Value *Arg = I.getOperand(i);
|
||||
SDOperand ArgNode = getValue(Arg);
|
||||
Entry.Node = ArgNode; Entry.Ty = Arg->getType();
|
||||
Entry.isSExt = Attrs && Attrs->paramHasAttr(i, ParamAttr::SExt);
|
||||
Entry.isZExt = Attrs && Attrs->paramHasAttr(i, ParamAttr::ZExt);
|
||||
Entry.isInReg = Attrs && Attrs->paramHasAttr(i, ParamAttr::InReg);
|
||||
Entry.isSRet = Attrs && Attrs->paramHasAttr(i, ParamAttr::StructRet);
|
||||
|
||||
unsigned attrInd = i - OpIdx + 1;
|
||||
Entry.isSExt = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::SExt);
|
||||
Entry.isZExt = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::ZExt);
|
||||
Entry.isInReg = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::InReg);
|
||||
Entry.isSRet = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::StructRet);
|
||||
Args.push_back(Entry);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user