From f19bb0f4d45ba4352c4392807ca2b1efe5918ea7 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 8 Jun 2021 14:33:49 +0100 Subject: Make default calling convention code more correct to read --- src/types.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/types.cpp') 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\" "); -- cgit v1.2.3