[WebAssembly] Minor code simplification. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2015-11-14 23:28:15 +00:00
parent df0392d2b2
commit 1fbb445098

View File

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