summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-09-09 01:52:45 +0000
committerDan Gohman <dan433584@gmail.com>2015-09-09 01:52:45 +0000
commite590b33bf88561c1a5b9ae76823562b16934d2cd (patch)
tree9eb0f01f18b0a38fec109f551d9d8055055d53cb /llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
parent0d22f2d57eaa7f8807b88dab1efe45707a9a1827 (diff)
downloadbcm5719-llvm-e590b33bf88561c1a5b9ae76823562b16934d2cd.tar.gz
bcm5719-llvm-e590b33bf88561c1a5b9ae76823562b16934d2cd.zip
[WebAssembly] Fix lowering of calls with more than one argument.
llvm-svn: 247118
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index f4c2e5bce0d..7e9e1b0e016 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -228,16 +228,19 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI,
SmallVectorImpl<ISD::OutputArg> &Outs = CLI.Outs;
SmallVectorImpl<SDValue> &OutVals = CLI.OutVals;
+
bool IsStructRet = (Outs.empty()) ? false : Outs[0].Flags.isSRet();
if (IsStructRet)
fail(DL, DAG, "WebAssembly doesn't support struct return yet");
- if (Outs.size() > 1)
- fail(DL, DAG, "WebAssembly doesn't support more than 1 returned value yet");
SmallVectorImpl<ISD::InputArg> &Ins = CLI.Ins;
+ if (Ins.size() > 1)
+ fail(DL, DAG, "WebAssembly doesn't support more than 1 returned value yet");
+
bool IsVarArg = CLI.IsVarArg;
if (IsVarArg)
fail(DL, DAG, "WebAssembly doesn't support varargs yet");
+
// Analyze operands of the call, assigning locations to each operand.
SmallVector<CCValAssign, 16> ArgLocs;
CCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.getContext());
OpenPOWER on IntegriCloud