aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-10-09 13:22:16 -0400
committerGitHub <noreply@github.com>2019-10-09 13:22:16 -0400
commitf929a58d5f69c26c25ced89f31f60d0a92ffc46a (patch)
tree498df11397ec8025c5cd8625954f0a14fcf1e1f5 /src/analyze.cpp
parent0fc97015e2898bb2ae9de04dd087d5d3220faf71 (diff)
parent6a687bda76a34775bde35ee386e59f53961341f7 (diff)
downloadzig-f929a58d5f69c26c25ced89f31f60d0a92ffc46a.tar.gz
zig-f929a58d5f69c26c25ced89f31f60d0a92ffc46a.zip
Merge pull request #3389 from LemonBoy/win32
Win32
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index cb30285800..82b09175d3 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -913,7 +913,10 @@ bool want_first_arg_sret(CodeGen *g, FnTypeId *fn_type_id) {
if (type_is_c_abi_int(g, fn_type_id->return_type)) {
return false;
}
- if (g->zig_target->arch == ZigLLVM_x86_64) {
+ if (g->zig_target->arch == ZigLLVM_x86) {
+ X64CABIClass abi_class = type_c_abi_x86_64_class(g, fn_type_id->return_type);
+ return abi_class == X64CABIClass_MEMORY;
+ } else if (g->zig_target->arch == ZigLLVM_x86_64) {
X64CABIClass abi_class = type_c_abi_x86_64_class(g, fn_type_id->return_type);
return abi_class == X64CABIClass_MEMORY;
} else if (target_is_arm(g->zig_target) || target_is_riscv(g->zig_target)) {