mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 22:28:46 +00:00
codegen/gen_src.cpp fixes for building with metaprogram clang
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
#pragma clang diagnostic ignored "-Wswitch"
|
||||||
|
|
||||||
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
#define GEN_DEFINE_LIBRARY_CODE_CONSTANTS
|
||||||
#define GEN_ENFORCE_STRING_CODE_TYPES
|
#define GEN_ENFORCE_STRING_CODE_TYPES
|
||||||
#define GEN_EXPOSE_BACKEND
|
#define GEN_EXPOSE_BACKEND
|
||||||
@@ -249,6 +251,7 @@ int gen_main()
|
|||||||
for (Code ast_code : code_struct->Body) switch (ast_code->Type)
|
for (Code ast_code : code_struct->Body) switch (ast_code->Type)
|
||||||
{
|
{
|
||||||
case ECode::Union:
|
case ECode::Union:
|
||||||
|
{
|
||||||
// Swap out the union's contents with the generated member definitions
|
// Swap out the union's contents with the generated member definitions
|
||||||
CodeBody body_swap = def_body(ECode::Union_Body);
|
CodeBody body_swap = def_body(ECode::Union_Body);
|
||||||
for (Odin_AstKind kind : ast_kinds)
|
for (Odin_AstKind kind : ast_kinds)
|
||||||
@@ -256,6 +259,7 @@ int gen_main()
|
|||||||
Ast<name> <name>;
|
Ast<name> <name>;
|
||||||
))));
|
))));
|
||||||
ast_code->Body = rcast(AST*, body_swap.ast);
|
ast_code->Body = rcast(AST*, body_swap.ast);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user