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/docs_writer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/docs_writer.cpp') diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp index fb4573b9f..19f5ae156 100644 --- a/src/docs_writer.cpp +++ b/src/docs_writer.cpp @@ -676,11 +676,17 @@ OdinDocTypeIndex odin_doc_type(OdinDocWriter *w, Type *type) { String calling_convention = {}; switch (type->Proc.calling_convention) { case ProcCC_Invalid: - case ProcCC_Odin: // no need break; + case ProcCC_Odin: + if (default_calling_convention() != ProcCC_Odin) { + calling_convention = str_lit("odin"); + } + break; case ProcCC_Contextless: - calling_convention = str_lit("contextless"); + if (default_calling_convention() != ProcCC_Contextless) { + calling_convention = str_lit("contextless"); + } break; case ProcCC_CDecl: calling_convention = str_lit("cdecl"); -- cgit v1.2.3