summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-02-12 21:30:18 +0000
committerDan Gohman <dan433584@gmail.com>2016-02-12 21:30:18 +0000
commita6771b37f814b6c5d3f547323d9c49babef4844b (patch)
treecf05223fd58a91326a9167c0160bee4717ba245e /llvm/lib/Target/WebAssembly
parent026f15e68706822bf26c133f28dbf43b9c85fc95 (diff)
downloadbcm5719-llvm-a6771b37f814b6c5d3f547323d9c49babef4844b.tar.gz
bcm5719-llvm-a6771b37f814b6c5d3f547323d9c49babef4844b.zip
[WebAssembly] Fix byval for empty types.
llvm-svn: 260740
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index 779e23f7773..7d63d89f17e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -308,9 +308,8 @@ SDValue WebAssemblyTargetLowering::LowerCall(
fail(DL, DAG, "WebAssembly hasn't implemented cons regs arguments");
if (Out.Flags.isInConsecutiveRegsLast())
fail(DL, DAG, "WebAssembly hasn't implemented cons regs last arguments");
- if (Out.Flags.isByVal()) {
+ if (Out.Flags.isByVal() && Out.Flags.getByValSize() != 0) {
auto *MFI = MF.getFrameInfo();
- assert(Out.Flags.getByValSize() && "Zero-size byval?");
int FI = MFI->CreateStackObject(Out.Flags.getByValSize(),
Out.Flags.getByValAlign(),
/*isSS=*/false);
OpenPOWER on IntegriCloud