From f39d8644fababac8fa9a1b4dabe1754b831c1fb5 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 10 Dec 2015 00:22:40 +0000 Subject: [PATCH] [WebAssembly] Fix copy+pastos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255180 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../WebAssembly/WebAssemblyISelLowering.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 4883d83647d..a8b93ca8a2f 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -313,14 +313,16 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI, SmallVectorImpl &Outs = CLI.Outs; for (const ISD::OutputArg &Out : Outs) { - 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.isByVal()) + fail(DL, DAG, "WebAssembly hasn't implemented byval arguments"); + if (Out.Flags.isNest()) + fail(DL, DAG, "WebAssembly hasn't implemented nest arguments"); if (Out.Flags.isInAlloca()) - fail(DL, DAG, "WebAssembly hasn't implemented inalloca results"); + fail(DL, DAG, "WebAssembly hasn't implemented inalloca arguments"); if (Out.Flags.isInConsecutiveRegs()) - fail(DL, DAG, "WebAssembly hasn't implemented cons regs results"); + fail(DL, DAG, "WebAssembly hasn't implemented cons regs arguments"); if (Out.Flags.isInConsecutiveRegsLast()) - fail(DL, DAG, "WebAssembly hasn't implemented cons regs last results"); + fail(DL, DAG, "WebAssembly hasn't implemented cons regs last arguments"); } bool IsVarArg = CLI.IsVarArg; @@ -388,16 +390,14 @@ WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI, SmallVector Tys; for (const auto &In : Ins) { - if (In.Flags.isByVal()) - fail(DL, DAG, "WebAssembly hasn't implemented byval arguments"); + assert(!In.Flags.isByVal() && "byval is not valid for return values"); + assert(!In.Flags.isNest() && "nest is not valid for return values"); if (In.Flags.isInAlloca()) - fail(DL, DAG, "WebAssembly hasn't implemented inalloca arguments"); - if (In.Flags.isNest()) - fail(DL, DAG, "WebAssembly hasn't implemented nest arguments"); + fail(DL, DAG, "WebAssembly hasn't implemented inalloca return values"); if (In.Flags.isInConsecutiveRegs()) - fail(DL, DAG, "WebAssembly hasn't implemented cons regs arguments"); + fail(DL, DAG, "WebAssembly hasn't implemented cons regs return values"); if (In.Flags.isInConsecutiveRegsLast()) - fail(DL, DAG, "WebAssembly hasn't implemented cons regs last arguments"); + fail(DL, DAG, "WebAssembly hasn't implemented cons regs last return values"); // Ignore In.getOrigAlign() because all our arguments are passed in // registers. Tys.push_back(In.VT); -- 2.34.1