diff options
| author | gingerBill <bill@gingerbill.org> | 2021-09-08 13:22:03 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-09-08 13:22:03 +0100 |
| commit | e0ee59084e913f572c6f8676aa056750c31628eb (patch) | |
| tree | f72a3c580be3650b1410ac0a6401c47360ec598e /src/parser.cpp | |
| parent | 8ff898079ff0c5ab8bb73827edb908a98911f376 (diff) | |
Add calling convention `"system"` which is an alias for `"stdcall"` on Windows and `"cdecl"` on other platforms
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 778afbcd6..b56015dc1 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3273,6 +3273,12 @@ ProcCallingConvention string_to_calling_convention(String s) { if (s == "fast") return ProcCC_FastCall; if (s == "none") return ProcCC_None; if (s == "naked") return ProcCC_Naked; + if (s == "system") { + if (build_context.metrics.os == TargetOs_windows) { + return ProcCC_StdCall; + } + return ProcCC_CDecl; + } return ProcCC_Invalid; } |