From: Dan Gohman Date: Sat, 14 Nov 2015 23:28:15 +0000 (+0000) Subject: [WebAssembly] Minor code simplification. NFC. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=1fbb4450985ebf001d83dffe7273f63ca9a05e5a [WebAssembly] Minor code simplification. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253150 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 85a123bdc56..47eea934b8c 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/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()->addParam(In.VT); - ++ArgNo; } return Chain;