diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 85a123bdc56..47eea934b8c 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -369,7 +369,6 @@ SDValue WebAssemblyTargetLowering::LowerFormalArguments( if (IsVarArg) fail(DL, DAG, "WebAssembly doesn't support varargs yet"); - unsigned ArgNo = 0; for (const ISD::InputArg &In : Ins) { if (In.Flags.isByVal()) fail(DL, DAG, "WebAssembly hasn't implemented byval arguments"); @@ -385,12 +384,11 @@ SDValue WebAssemblyTargetLowering::LowerFormalArguments( InVals.push_back( In.Used ? DAG.getNode(WebAssemblyISD::ARGUMENT, DL, In.VT, - DAG.getTargetConstant(ArgNo, DL, MVT::i32)) + DAG.getTargetConstant(InVals.size(), DL, MVT::i32)) : DAG.getNode(ISD::UNDEF, DL, In.VT)); // Record the number and types of arguments. MF.getInfo<WebAssemblyFunctionInfo>()->addParam(In.VT); - ++ArgNo; } return Chain; |

