aboutsummaryrefslogtreecommitdiff
path: root/src/tilde_debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tilde_debug.cpp')
-rw-r--r--src/tilde_debug.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tilde_debug.cpp b/src/tilde_debug.cpp
index 21594ef07..e6e60be96 100644
--- a/src/tilde_debug.cpp
+++ b/src/tilde_debug.cpp
@@ -368,7 +368,11 @@ gb_internal TB_DebugType *cg_debug_type_internal(cgModule *m, Type *type) {
param_count += 1;
}
- TB_DebugType *func = tb_debug_create_func(m->mod, TB_CDECL, param_count, return_count, pt->c_vararg);
+ TB_CallingConv tb_cc = TB_CDECL;
+ if (pt->calling_convention == ProcCC_StdCall) {
+ tb_cc = TB_STDCALL;
+ }
+ TB_DebugType *func = tb_debug_create_func(m->mod, tb_cc, param_count, return_count, pt->c_vararg);
map_set(&m->proc_debug_type_map, original_type, func);
map_set(&m->proc_debug_type_map, type, func);