summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-12-02 23:40:03 +0000
committerDan Gohman <dan433584@gmail.com>2015-12-02 23:40:03 +0000
commitac132e9305b00b588396ef9ef06d3521da233b9a (patch)
tree87f3619bd4f8b44ed54debf06186d8f81fd9e3b5 /llvm/lib
parent632e0ce8cedc42424ee11cbfddc8c3ec27c4eda8 (diff)
downloadbcm5719-llvm-ac132e9305b00b588396ef9ef06d3521da233b9a.tar.gz
bcm5719-llvm-ac132e9305b00b588396ef9ef06d3521da233b9a.zip
[WebAssembly] Assert that byval and nest are not used for return types.
llvm-svn: 254567
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index 8f1a06d4630..2485df1ab5d 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -353,12 +353,10 @@ SDValue WebAssemblyTargetLowering::LowerReturn(
// Record the number and types of the return values.
for (const ISD::OutputArg &Out : Outs) {
- if (Out.Flags.isByVal())
- fail(DL, DAG, "WebAssembly hasn't implemented byval results");
+ assert(!Out.Flags.isByVal() && "byval is not valid for return values");
+ assert(!Out.Flags.isNest() && "nest is not valid for return values");
if (Out.Flags.isInAlloca())
fail(DL, DAG, "WebAssembly hasn't implemented inalloca results");
- if (Out.Flags.isNest())
- fail(DL, DAG, "WebAssembly hasn't implemented nest results");
if (Out.Flags.isInConsecutiveRegs())
fail(DL, DAG, "WebAssembly hasn't implemented cons regs results");
if (Out.Flags.isInConsecutiveRegsLast())
OpenPOWER on IntegriCloud