aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 2d7b5bb1d4..623f946307 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -337,7 +337,12 @@ static LLVMCallConv get_llvm_cc(CodeGen *g, CallingConvention cc) {
if (g->zig_target.arch.arch == ZigLLVM_x86 ||
g->zig_target.arch.arch == ZigLLVM_x86_64)
{
- return LLVMColdCallConv;
+ // cold calling convention is not supported on windows
+ if (g->zig_target.os == ZigLLVM_Win32) {
+ return LLVMCCallConv;
+ } else {
+ return LLVMColdCallConv;
+ }
} else {
return LLVMCCallConv;
}