aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-02-23 14:42:44 +0000
committergingerBill <bill@gingerbill.org>2019-02-23 14:42:44 +0000
commit64bd884d94fc45600eaed9566585d455b875a87a (patch)
tree7eb8becaf379c2caa4c539243b5b2dad1e64a703 /src
parenta07232ea6367337d785ef07a1de659c7555357bf (diff)
Add "none" calling convention
Diffstat (limited to 'src')
-rw-r--r--src/ir_print.cpp1
-rw-r--r--src/parser.cpp1
-rw-r--r--src/parser.hpp3
-rw-r--r--src/types.cpp3
4 files changed, 8 insertions, 0 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp
index a3fdc282b..c6e717f74 100644
--- a/src/ir_print.cpp
+++ b/src/ir_print.cpp
@@ -1052,6 +1052,7 @@ void ir_print_calling_convention(irFileBuffer *f, irModule *m, ProcCallingConven
case ProcCC_CDecl: ir_write_str_lit(f, "ccc "); break;
case ProcCC_StdCall: ir_write_str_lit(f, "cc 64 "); break;
case ProcCC_FastCall: ir_write_str_lit(f, "cc 65 "); break;
+ case ProcCC_None: ir_write_str_lit(f, ""); break;
default: GB_PANIC("unknown calling convention: %d", cc);
}
}
diff --git a/src/parser.cpp b/src/parser.cpp
index a62bac233..e38c34a0a 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2700,6 +2700,7 @@ ProcCallingConvention string_to_calling_convention(String s) {
if (s == "std") return ProcCC_StdCall;
if (s == "fastcall") return ProcCC_FastCall;
if (s == "fast") return ProcCC_FastCall;
+ if (s == "none") return ProcCC_None;
return ProcCC_Invalid;
}
diff --git a/src/parser.hpp b/src/parser.hpp
index fabb7ff8e..13dd1258c 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -166,6 +166,9 @@ enum ProcCallingConvention {
// ProcCC_VectorCall,
// ProcCC_ClrCall,
+ ProcCC_None,
+
+
ProcCC_ForeignBlockDefault = -1,
};
diff --git a/src/types.cpp b/src/types.cpp
index 52c06ef71..859805f29 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -2894,6 +2894,9 @@ gbString write_type_to_string(gbString str, Type *type) {
case ProcCC_FastCall:
str = gb_string_appendc(str, " \"fastcall\" ");
break;
+ case ProcCC_None:
+ str = gb_string_appendc(str, " \"none\" ");
+ break;
// case ProcCC_VectorCall:
// str = gb_string_appendc(str, " \"vectorcall\" ");
// break;