[llvm] r254567 - [WebAssembly] Assert that byval and nest are not used for return types.

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 15:40:03 PST 2015


Author: djg
Date: Wed Dec  2 17:40:03 2015
New Revision: 254567

URL: http://llvm.org/viewvc/llvm-project?rev=254567&view=rev
Log:
[WebAssembly] Assert that byval and nest are not used for return types.

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?rev=254567&r1=254566&r2=254567&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp Wed Dec  2 17:40:03 2015
@@ -353,12 +353,10 @@ SDValue WebAssemblyTargetLowering::Lower
 
   // 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())




More information about the llvm-commits mailing list