diff options
| author | Alexandros Naskos <alex_naskos@hotmail.com> | 2018-04-28 19:57:59 +0300 |
|---|---|---|
| committer | Alexandros Naskos <alex_naskos@hotmail.com> | 2018-04-28 19:57:59 +0300 |
| commit | af73462da46611ea9293f283ce8a6920ad73b10f (patch) | |
| tree | ceee8d805da4fc252cbe406c6b0630891d9e763a /src/codegen.cpp | |
| parent | 9ba400673d798ea6f0842e4c207039c9faffb27e (diff) | |
| download | zig-af73462da46611ea9293f283ce8a6920ad73b10f.tar.gz zig-af73462da46611ea9293f283ce8a6920ad73b10f.zip | |
Started work on function definition TypeInfo generation.
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index be1d59c26a..414a34d5cb 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -6494,7 +6494,19 @@ static void define_builtin_compile_vars(CodeGen *g) { " const Data = union(enum) {\n" " Type: type,\n" " Var: type,\n" - " Fn: void,\n" + " Fn: FnDef,\n" + "\n" + " const FnDef = struct {\n" + " fn_type: type,\n" + " inline_type: Inline,\n" + " calling_convention: CallingConvention,\n" + "\n" + " const Inline = enum {\n" + " Auto,\n" + " Always,\n" + " Never,\n" + " };\n" + " };\n" " };\n" " };\n" "};\n\n"); @@ -6508,6 +6520,10 @@ static void define_builtin_compile_vars(CodeGen *g) { assert(CallingConventionNaked == 3); assert(CallingConventionStdcall == 4); assert(CallingConventionAsync == 5); + + assert(FnInlineAuto == 0); + assert(FnInlineAlways == 1); + assert(FnInlineNever == 2); } { buf_appendf(contents, |
