aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-06-08 14:33:49 +0100
committergingerBill <bill@gingerbill.org>2021-06-08 14:33:49 +0100
commitf19bb0f4d45ba4352c4392807ca2b1efe5918ea7 (patch)
tree852f3256f8f7e0fd85a95de69cde84b6f17992e5 /src/types.cpp
parent76bb82a7260158cb1ecd5d2da1b775fbdb1f0b7d (diff)
Make default calling convention code more correct to read
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 04ac31a01..f36765641 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -3618,9 +3618,14 @@ gbString write_type_to_string(gbString str, Type *type) {
switch (type->Proc.calling_convention) {
case ProcCC_Odin:
+ if (default_calling_convention() != ProcCC_Odin) {
+ str = gb_string_appendc(str, " \"odin\" ");
+ }
break;
case ProcCC_Contextless:
- str = gb_string_appendc(str, " \"contextless\" ");
+ if (default_calling_convention() != ProcCC_Contextless) {
+ str = gb_string_appendc(str, " \"contextless\" ");
+ }
break;
case ProcCC_CDecl:
str = gb_string_appendc(str, " \"cdecl\" ");