aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-07-19 22:01:32 +0200
committerLuuk de Gram <luuk@degram.dev>2022-07-25 06:34:00 +0200
commit6b4d4c70fd8b8696eb1220438b89f769a3c3a908 (patch)
treee675c397482c996915f274d082c06f7395f95ea9 /src/codegen/llvm.zig
parent200b2e4ee108d388e0db2120aee38f83d1c7abdb (diff)
downloadzig-6b4d4c70fd8b8696eb1220438b89f769a3c3a908.tar.gz
zig-6b4d4c70fd8b8696eb1220438b89f769a3c3a908.zip
wasm: Only allow lowering C-ABI compatible types
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 8dbb9cae31..b4bf8449ce 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -9094,10 +9094,7 @@ fn firstParamSRet(fn_info: Type.Payload.Function.Data, target: std.Target) bool
.windows => return x86_64_abi.classifyWindows(fn_info.return_type, target) == .memory,
else => return x86_64_abi.classifySystemV(fn_info.return_type, target)[0] == .memory,
},
- .wasm32 => {
- const classes = wasm_c_abi.classifyType(fn_info.return_type, target);
- return classes[0] == .indirect;
- },
+ .wasm32 => return wasm_c_abi.classifyType(fn_info.return_type, target)[0] == .indirect,
else => return false, // TODO investigate C ABI for other architectures
},
else => return false,