From 66e256e46ec68ed425d0bf0b067a3bf003915a09 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 2 Dec 2015 23:40:03 +0000 Subject: [PATCH 1/1] [WebAssembly] Assert that byval and nest are not used for return types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254567 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 8f1a06d4630..2485df1ab5d 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/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()) -- 2.34.1