summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-11-14 23:28:15 +0000
committerDan Gohman <dan433584@gmail.com>2015-11-14 23:28:15 +0000
commit5219ecf068cf493e1e1169e49d01a9727aca6456 (patch)
treef32f0d1c0747656ea4b69dc681dfbe1d6593e9d2 /llvm/lib
parent19601fbc8ac6fbfbfad43c03e4587899641a2683 (diff)
downloadbcm5719-llvm-5219ecf068cf493e1e1169e49d01a9727aca6456.tar.gz
bcm5719-llvm-5219ecf068cf493e1e1169e49d01a9727aca6456.zip
[WebAssembly] Minor code simplification. NFC.
llvm-svn: 253150
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp4
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;
OpenPOWER on IntegriCloud