| author | |
| committer | |
| log | e8e2d84689ec2eb19d0b725743a87f1892137665 |
| tree | e3f5dd6859cb0aa69a5c0d1898d7cf947c13f751 |
| parent | a31eb977b4b930aa588283c5bf07b2e83987a0ed |
| parent | 4979e606c36fdca886f82b0dd8c0db17374ab8f6 |
10 files changed, 281 insertions(+), 125 deletions(-)
README.md+2-2| ... | ... | @@ -70,8 +70,8 @@ compromises backward compatibility. |
| 70 | 70 | ### Dependencies |
| 71 | 71 | |
| 72 | 72 | * cmake >= 2.8.5 |
| 73 | * LLVM == 3.8.0 | |
| 74 | * libclang == 3.8.0 | |
| 73 | * LLVM == 3.9.x | |
| 74 | * libclang == 3.9.x | |
| 75 | 75 | |
| 76 | 76 | ### Debug / Development Build |
| 77 | 77 |
cmake/Findclang.cmake+2-2| ... | ... | @@ -8,14 +8,14 @@ |
| 8 | 8 | |
| 9 | 9 | find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h |
| 10 | 10 | PATHS |
| 11 | /usr/lib/llvm-3.8/include | |
| 11 | /usr/lib/llvm-3.9/include | |
| 12 | 12 | /mingw64/include) |
| 13 | 13 | |
| 14 | 14 | macro(FIND_AND_ADD_CLANG_LIB _libname_) |
| 15 | 15 | string(TOUPPER ${_libname_} _prettylibname_) |
| 16 | 16 | find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_} |
| 17 | 17 | PATHS |
| 18 | /usr/lib/llvm-3.8/lib | |
| 18 | /usr/lib/llvm-3.9/lib | |
| 19 | 19 | /mingw64/lib) |
| 20 | 20 | if(CLANG_${_prettylibname_}_LIB) |
| 21 | 21 | set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_${_prettylibname_}_LIB}) |
cmake/Findllvm.cmake+1-1| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | # LLVM_LIBRARIES |
| 8 | 8 | # LLVM_LIBDIRS |
| 9 | 9 | |
| 10 | find_program(LLVM_CONFIG_EXE NAMES llvm-config llvm-config-3.8) | |
| 10 | find_program(LLVM_CONFIG_EXE NAMES llvm-config llvm-config-3.9) | |
| 11 | 11 | |
| 12 | 12 | execute_process( |
| 13 | 13 | COMMAND ${LLVM_CONFIG_EXE} --libs |
src/all_types.hpp+1| ... | ... | @@ -1336,6 +1336,7 @@ struct VariableTableEntry { |
| 1336 | 1336 | BlockContext *block_context; |
| 1337 | 1337 | LLVMValueRef param_value_ref; |
| 1338 | 1338 | bool force_depends_on_compile_var; |
| 1339 | ImportTableEntry *import; | |
| 1339 | 1340 | }; |
| 1340 | 1341 | |
| 1341 | 1342 | struct ErrorTableEntry { |
src/analyze.cpp+2-1| ... | ... | @@ -3757,6 +3757,7 @@ static VariableTableEntry *add_local_var(CodeGen *g, AstNode *source_node, Impor |
| 3757 | 3757 | VariableTableEntry *variable_entry = allocate<VariableTableEntry>(1); |
| 3758 | 3758 | variable_entry->type = type_entry; |
| 3759 | 3759 | variable_entry->block_context = context; |
| 3760 | variable_entry->import = import; | |
| 3760 | 3761 | |
| 3761 | 3762 | if (name) { |
| 3762 | 3763 | buf_init_from_buf(&variable_entry->name, name); |
| ... | ... | @@ -6025,7 +6026,7 @@ static TypeTableEntry *analyze_switch_expr(CodeGen *g, ImportTableEntry *import, |
| 6025 | 6026 | |
| 6026 | 6027 | |
| 6027 | 6028 | int *field_use_counts = nullptr; |
| 6028 | HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes; | |
| 6029 | HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes = {}; | |
| 6029 | 6030 | if (expr_type->id == TypeTableEntryIdEnum) { |
| 6030 | 6031 | field_use_counts = allocate<int>(expr_type->data.enumeration.field_count); |
| 6031 | 6032 | } else if (expr_type->id == TypeTableEntryIdErrorUnion) { |
src/codegen.cpp+46-7| ... | ... | @@ -2757,7 +2757,7 @@ static LLVMValueRef gen_if_var_expr(CodeGen *g, AstNode *node) { |
| 2757 | 2757 | static LLVMValueRef gen_block(CodeGen *g, AstNode *block_node, TypeTableEntry *implicit_return_type) { |
| 2758 | 2758 | assert(block_node->type == NodeTypeBlock); |
| 2759 | 2759 | |
| 2760 | LLVMValueRef return_value; | |
| 2760 | LLVMValueRef return_value = nullptr; | |
| 2761 | 2761 | for (int i = 0; i < block_node->data.block.statements.length; i += 1) { |
| 2762 | 2762 | AstNode *statement_node = block_node->data.block.statements.at(i); |
| 2763 | 2763 | return_value = gen_expr(g, statement_node); |
| ... | ... | @@ -3301,7 +3301,7 @@ static LLVMValueRef gen_var_decl_expr(CodeGen *g, AstNode *node) { |
| 3301 | 3301 | } |
| 3302 | 3302 | } |
| 3303 | 3303 | |
| 3304 | LLVMValueRef init_val; | |
| 3304 | LLVMValueRef init_val = nullptr; | |
| 3305 | 3305 | TypeTableEntry *init_val_type; |
| 3306 | 3306 | return gen_var_decl_raw(g, node, &node->data.variable_declaration, false, &init_val, &init_val_type, false); |
| 3307 | 3307 | } |
| ... | ... | @@ -3954,6 +3954,19 @@ static void build_label_blocks(CodeGen *g, FnTableEntry *fn) { |
| 3954 | 3954 | LLVMPositionBuilderAtEnd(g->builder, entry_block); |
| 3955 | 3955 | } |
| 3956 | 3956 | |
| 3957 | static void gen_global_var(CodeGen *g, VariableTableEntry *var, LLVMValueRef init_val, | |
| 3958 | TypeTableEntry *type_entry) | |
| 3959 | { | |
| 3960 | assert(var->is_const); | |
| 3961 | assert(var->import); | |
| 3962 | assert(type_entry); | |
| 3963 | bool is_local_to_unit = true; | |
| 3964 | LLVMZigCreateGlobalVariable(g->dbuilder, | |
| 3965 | var->block_context->di_scope, buf_ptr(&var->name), | |
| 3966 | buf_ptr(&var->name), var->import->di_file, var->decl_node->line + 1, | |
| 3967 | type_entry->di_type, is_local_to_unit, init_val); | |
| 3968 | } | |
| 3969 | ||
| 3957 | 3970 | static void do_code_gen(CodeGen *g) { |
| 3958 | 3971 | assert(!g->errors.length); |
| 3959 | 3972 | |
| ... | ... | @@ -3967,10 +3980,29 @@ static void do_code_gen(CodeGen *g) { |
| 3967 | 3980 | for (int i = 0; i < g->global_vars.length; i += 1) { |
| 3968 | 3981 | VariableTableEntry *var = g->global_vars.at(i); |
| 3969 | 3982 | |
| 3970 | if (var->type->id == TypeTableEntryIdNumLitFloat || | |
| 3971 | var->type->id == TypeTableEntryIdNumLitInt || | |
| 3972 | !type_has_bits(var->type)) | |
| 3973 | { | |
| 3983 | if (var->type->id == TypeTableEntryIdNumLitFloat) { | |
| 3984 | // Generate debug info for it but that's it. | |
| 3985 | ConstExprValue *const_val = &get_resolved_expr(var->val_node)->const_val; | |
| 3986 | assert(const_val->ok); | |
| 3987 | TypeTableEntry *var_type = g->builtin_types.entry_f64; | |
| 3988 | LLVMValueRef init_val = LLVMConstReal(var_type->type_ref, const_val->data.x_bignum.data.x_float); | |
| 3989 | gen_global_var(g, var, init_val, var_type); | |
| 3990 | continue; | |
| 3991 | } | |
| 3992 | ||
| 3993 | if (var->type->id == TypeTableEntryIdNumLitInt) { | |
| 3994 | // Generate debug info for it but that's it. | |
| 3995 | ConstExprValue *const_val = &get_resolved_expr(var->val_node)->const_val; | |
| 3996 | assert(const_val->ok); | |
| 3997 | TypeTableEntry *var_type = const_val->data.x_bignum.is_negative ? | |
| 3998 | g->builtin_types.entry_isize : g->builtin_types.entry_usize; | |
| 3999 | LLVMValueRef init_val = LLVMConstInt(var_type->type_ref, | |
| 4000 | bignum_to_twos_complement(&const_val->data.x_bignum), false); | |
| 4001 | gen_global_var(g, var, init_val, var_type); | |
| 4002 | continue; | |
| 4003 | } | |
| 4004 | ||
| 4005 | if (!type_has_bits(var->type)) { | |
| 3974 | 4006 | continue; |
| 3975 | 4007 | } |
| 3976 | 4008 | |
| ... | ... | @@ -3981,6 +4013,8 @@ static void do_code_gen(CodeGen *g) { |
| 3981 | 4013 | if (var->decl_node->data.variable_declaration.is_extern) { |
| 3982 | 4014 | global_value = LLVMAddGlobal(g->module, var->type->type_ref, buf_ptr(&var->name)); |
| 3983 | 4015 | |
| 4016 | // TODO debug info for the extern variable | |
| 4017 | ||
| 3984 | 4018 | LLVMSetLinkage(global_value, LLVMExternalLinkage); |
| 3985 | 4019 | } else { |
| 3986 | 4020 | AstNode *expr_node = var->decl_node->data.variable_declaration.expr; |
| ... | ... | @@ -3999,6 +4033,11 @@ static void do_code_gen(CodeGen *g) { |
| 3999 | 4033 | LLVMSetInitializer(global_value, init_val); |
| 4000 | 4034 | LLVMSetLinkage(global_value, LLVMInternalLinkage); |
| 4001 | 4035 | LLVMSetUnnamedAddr(global_value, true); |
| 4036 | ||
| 4037 | // TODO debug info for function pointers | |
| 4038 | if (var->is_const && var->type->id != TypeTableEntryIdFn) { | |
| 4039 | gen_global_var(g, var, init_val, var->type); | |
| 4040 | } | |
| 4002 | 4041 | } |
| 4003 | 4042 | |
| 4004 | 4043 | LLVMSetGlobalConstant(global_value, var->is_const); |
| ... | ... | @@ -4847,7 +4886,7 @@ static void init(CodeGen *g, Buf *source_path) { |
| 4847 | 4886 | g->target_machine = LLVMCreateTargetMachine(target_ref, buf_ptr(&g->triple_str), |
| 4848 | 4887 | target_specific_cpu_args, target_specific_features, opt_level, reloc_mode, LLVMCodeModelDefault); |
| 4849 | 4888 | |
| 4850 | g->target_data_ref = LLVMGetTargetMachineData(g->target_machine); | |
| 4889 | g->target_data_ref = LLVMCreateTargetDataLayout(g->target_machine); | |
| 4851 | 4890 | |
| 4852 | 4891 | char *layout_str = LLVMCopyStringRepOfTargetData(g->target_data_ref); |
| 4853 | 4892 | LLVMSetDataLayout(g->module, layout_str); |
src/parseh.cpp+56-21| ... | ... | @@ -408,25 +408,7 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const |
| 408 | 408 | case BuiltinType::ObjCId: |
| 409 | 409 | case BuiltinType::ObjCClass: |
| 410 | 410 | case BuiltinType::ObjCSel: |
| 411 | case BuiltinType::OCLImage1d: | |
| 412 | case BuiltinType::OCLImage1dArray: | |
| 413 | case BuiltinType::OCLImage1dBuffer: | |
| 414 | case BuiltinType::OCLImage2d: | |
| 415 | case BuiltinType::OCLImage2dArray: | |
| 416 | case BuiltinType::OCLImage2dArrayDepth: | |
| 417 | case BuiltinType::OCLImage2dDepth: | |
| 418 | case BuiltinType::OCLImage2dMSAA: | |
| 419 | case BuiltinType::OCLImage2dArrayMSAA: | |
| 420 | case BuiltinType::OCLImage2dMSAADepth: | |
| 421 | case BuiltinType::OCLImage2dArrayMSAADepth: | |
| 422 | case BuiltinType::OCLClkEvent: | |
| 423 | case BuiltinType::OCLQueue: | |
| 424 | case BuiltinType::OCLNDRange: | |
| 425 | case BuiltinType::OCLReserveID: | |
| 426 | 411 | case BuiltinType::OMPArraySection: |
| 427 | case BuiltinType::OCLImage3d: | |
| 428 | case BuiltinType::OCLSampler: | |
| 429 | case BuiltinType::OCLEvent: | |
| 430 | 412 | case BuiltinType::Dependent: |
| 431 | 413 | case BuiltinType::Overload: |
| 432 | 414 | case BuiltinType::BoundMember: |
| ... | ... | @@ -434,6 +416,50 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const |
| 434 | 416 | case BuiltinType::UnknownAny: |
| 435 | 417 | case BuiltinType::BuiltinFn: |
| 436 | 418 | case BuiltinType::ARCUnbridgedCast: |
| 419 | ||
| 420 | case BuiltinType::OCLImage1dRO: | |
| 421 | case BuiltinType::OCLImage1dArrayRO: | |
| 422 | case BuiltinType::OCLImage1dBufferRO: | |
| 423 | case BuiltinType::OCLImage2dRO: | |
| 424 | case BuiltinType::OCLImage2dArrayRO: | |
| 425 | case BuiltinType::OCLImage2dDepthRO: | |
| 426 | case BuiltinType::OCLImage2dArrayDepthRO: | |
| 427 | case BuiltinType::OCLImage2dMSAARO: | |
| 428 | case BuiltinType::OCLImage2dArrayMSAARO: | |
| 429 | case BuiltinType::OCLImage2dMSAADepthRO: | |
| 430 | case BuiltinType::OCLImage2dArrayMSAADepthRO: | |
| 431 | case BuiltinType::OCLImage3dRO: | |
| 432 | case BuiltinType::OCLImage1dWO: | |
| 433 | case BuiltinType::OCLImage1dArrayWO: | |
| 434 | case BuiltinType::OCLImage1dBufferWO: | |
| 435 | case BuiltinType::OCLImage2dWO: | |
| 436 | case BuiltinType::OCLImage2dArrayWO: | |
| 437 | case BuiltinType::OCLImage2dDepthWO: | |
| 438 | case BuiltinType::OCLImage2dArrayDepthWO: | |
| 439 | case BuiltinType::OCLImage2dMSAAWO: | |
| 440 | case BuiltinType::OCLImage2dArrayMSAAWO: | |
| 441 | case BuiltinType::OCLImage2dMSAADepthWO: | |
| 442 | case BuiltinType::OCLImage2dArrayMSAADepthWO: | |
| 443 | case BuiltinType::OCLImage3dWO: | |
| 444 | case BuiltinType::OCLImage1dRW: | |
| 445 | case BuiltinType::OCLImage1dArrayRW: | |
| 446 | case BuiltinType::OCLImage1dBufferRW: | |
| 447 | case BuiltinType::OCLImage2dRW: | |
| 448 | case BuiltinType::OCLImage2dArrayRW: | |
| 449 | case BuiltinType::OCLImage2dDepthRW: | |
| 450 | case BuiltinType::OCLImage2dArrayDepthRW: | |
| 451 | case BuiltinType::OCLImage2dMSAARW: | |
| 452 | case BuiltinType::OCLImage2dArrayMSAARW: | |
| 453 | case BuiltinType::OCLImage2dMSAADepthRW: | |
| 454 | case BuiltinType::OCLImage2dArrayMSAADepthRW: | |
| 455 | case BuiltinType::OCLImage3dRW: | |
| 456 | case BuiltinType::Float128: | |
| 457 | case BuiltinType::OCLSampler: | |
| 458 | case BuiltinType::OCLEvent: | |
| 459 | case BuiltinType::OCLClkEvent: | |
| 460 | case BuiltinType::OCLQueue: | |
| 461 | case BuiltinType::OCLNDRange: | |
| 462 | case BuiltinType::OCLReserveID: | |
| 437 | 463 | emit_warning(c, decl, "missed a builtin type"); |
| 438 | 464 | return c->codegen->builtin_types.entry_invalid; |
| 439 | 465 | } |
| ... | ... | @@ -554,8 +580,17 @@ static TypeTableEntry *resolve_type_with_table(Context *c, const Type *ty, const |
| 554 | 580 | case CC_SpirFunction: // default for OpenCL functions on SPIR target |
| 555 | 581 | emit_warning(c, decl, "function type has SPIR function calling convention"); |
| 556 | 582 | return c->codegen->builtin_types.entry_invalid; |
| 557 | case CC_SpirKernel: // inferred for OpenCL kernels on SPIR target | |
| 558 | emit_warning(c, decl, "function type has SPIR kernel calling convention"); | |
| 583 | case CC_OpenCLKernel: | |
| 584 | emit_warning(c, decl, "function type has OpenCLKernel calling convention"); | |
| 585 | return c->codegen->builtin_types.entry_invalid; | |
| 586 | case CC_Swift: | |
| 587 | emit_warning(c, decl, "function type has Swift calling convention"); | |
| 588 | return c->codegen->builtin_types.entry_invalid; | |
| 589 | case CC_PreserveMost: | |
| 590 | emit_warning(c, decl, "function type has PreserveMost calling convention"); | |
| 591 | return c->codegen->builtin_types.entry_invalid; | |
| 592 | case CC_PreserveAll: | |
| 593 | emit_warning(c, decl, "function type has PreserveAll calling convention"); | |
| 559 | 594 | return c->codegen->builtin_types.entry_invalid; |
| 560 | 595 | } |
| 561 | 596 | |
| ... | ... | @@ -1170,7 +1205,7 @@ static void visit_var_decl(Context *c, const VarDecl *var_decl) { |
| 1170 | 1205 | emit_warning(c, var_decl, "ignoring variable '%s' - unable to evaluate initializer\n", buf_ptr(name)); |
| 1171 | 1206 | return; |
| 1172 | 1207 | } |
| 1173 | AstNode *init_node; | |
| 1208 | AstNode *init_node = nullptr; | |
| 1174 | 1209 | switch (ap_value->getKind()) { |
| 1175 | 1210 | case APValue::Int: |
| 1176 | 1211 | { |
src/target.cpp+78-31| ... | ... | @@ -15,6 +15,8 @@ static const ArchType arch_list[] = { |
| 15 | 15 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v8_2a}, |
| 16 | 16 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v8_1a}, |
| 17 | 17 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v8}, |
| 18 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v8m_baseline}, | |
| 19 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v8m_mainline}, | |
| 18 | 20 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v7}, |
| 19 | 21 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v7em}, |
| 20 | 22 | {ZigLLVM_arm, ZigLLVM_ARMSubArch_v7m}, |
| ... | ... | @@ -71,8 +73,11 @@ static const ArchType arch_list[] = { |
| 71 | 73 | {ZigLLVM_kalimba, ZigLLVM_KalimbaSubArch_v5}, |
| 72 | 74 | |
| 73 | 75 | {ZigLLVM_shave, ZigLLVM_NoSubArch}, |
| 76 | {ZigLLVM_lanai, ZigLLVM_NoSubArch}, | |
| 74 | 77 | {ZigLLVM_wasm32, ZigLLVM_NoSubArch}, |
| 75 | 78 | {ZigLLVM_wasm64, ZigLLVM_NoSubArch}, |
| 79 | {ZigLLVM_renderscript32, ZigLLVM_NoSubArch}, | |
| 80 | {ZigLLVM_renderscript64, ZigLLVM_NoSubArch}, | |
| 76 | 81 | }; |
| 77 | 82 | |
| 78 | 83 | static const ZigLLVM_VendorType vendor_list[] = { |
| ... | ... | @@ -88,6 +93,8 @@ static const ZigLLVM_VendorType vendor_list[] = { |
| 88 | 93 | ZigLLVM_NVIDIA, |
| 89 | 94 | ZigLLVM_CSR, |
| 90 | 95 | ZigLLVM_Myriad, |
| 96 | ZigLLVM_AMD, | |
| 97 | ZigLLVM_Mesa, | |
| 91 | 98 | }; |
| 92 | 99 | |
| 93 | 100 | static const ZigLLVM_OSType os_list[] = { |
| ... | ... | @@ -119,10 +126,12 @@ static const ZigLLVM_OSType os_list[] = { |
| 119 | 126 | ZigLLVM_ELFIAMCU, |
| 120 | 127 | ZigLLVM_TvOS, |
| 121 | 128 | ZigLLVM_WatchOS, |
| 129 | ZigLLVM_Mesa3D, | |
| 122 | 130 | }; |
| 123 | 131 | |
| 124 | 132 | static const ZigLLVM_EnvironmentType environ_list[] = { |
| 125 | 133 | ZigLLVM_GNU, |
| 134 | ZigLLVM_GNUABI64, | |
| 126 | 135 | ZigLLVM_GNUEABI, |
| 127 | 136 | ZigLLVM_GNUEABIHF, |
| 128 | 137 | ZigLLVM_GNUX32, |
| ... | ... | @@ -130,6 +139,9 @@ static const ZigLLVM_EnvironmentType environ_list[] = { |
| 130 | 139 | ZigLLVM_EABI, |
| 131 | 140 | ZigLLVM_EABIHF, |
| 132 | 141 | ZigLLVM_Android, |
| 142 | ZigLLVM_Musl, | |
| 143 | ZigLLVM_MuslEABI, | |
| 144 | ZigLLVM_MuslEABIHF, | |
| 133 | 145 | ZigLLVM_MSVC, |
| 134 | 146 | ZigLLVM_Itanium, |
| 135 | 147 | ZigLLVM_Cygnus, |
| ... | ... | @@ -289,42 +301,73 @@ void resolve_target_object_format(ZigTarget *target) { |
| 289 | 301 | if (target->oformat != ZigLLVM_UnknownObjectFormat) { |
| 290 | 302 | return; |
| 291 | 303 | } |
| 304 | ||
| 292 | 305 | switch (target->arch.arch) { |
| 293 | default: | |
| 294 | break; | |
| 295 | case ZigLLVM_hexagon: | |
| 296 | case ZigLLVM_mips: | |
| 297 | case ZigLLVM_mipsel: | |
| 298 | case ZigLLVM_mips64: | |
| 299 | case ZigLLVM_mips64el: | |
| 300 | case ZigLLVM_r600: | |
| 301 | case ZigLLVM_amdgcn: | |
| 302 | case ZigLLVM_sparc: | |
| 303 | case ZigLLVM_sparcv9: | |
| 304 | case ZigLLVM_systemz: | |
| 305 | case ZigLLVM_xcore: | |
| 306 | case ZigLLVM_ppc64le: | |
| 307 | target->oformat = ZigLLVM_ELF; | |
| 308 | return; | |
| 306 | case ZigLLVM_UnknownArch: | |
| 307 | case ZigLLVM_aarch64: | |
| 308 | case ZigLLVM_arm: | |
| 309 | case ZigLLVM_thumb: | |
| 310 | case ZigLLVM_x86: | |
| 311 | case ZigLLVM_x86_64: | |
| 312 | if (is_os_darwin(target)) { | |
| 313 | target->oformat = ZigLLVM_MachO; | |
| 314 | } else if (target->os == ZigLLVM_Win32) { | |
| 315 | target->oformat = ZigLLVM_COFF; | |
| 316 | } else { | |
| 317 | target->oformat = ZigLLVM_ELF; | |
| 318 | } | |
| 319 | return; | |
| 309 | 320 | |
| 310 | case ZigLLVM_ppc: | |
| 311 | case ZigLLVM_ppc64: | |
| 312 | if (is_os_darwin(target)) { | |
| 313 | target->oformat = ZigLLVM_MachO; | |
| 321 | case ZigLLVM_aarch64_be: | |
| 322 | case ZigLLVM_amdgcn: | |
| 323 | case ZigLLVM_amdil: | |
| 324 | case ZigLLVM_amdil64: | |
| 325 | case ZigLLVM_armeb: | |
| 326 | case ZigLLVM_avr: | |
| 327 | case ZigLLVM_bpfeb: | |
| 328 | case ZigLLVM_bpfel: | |
| 329 | case ZigLLVM_hexagon: | |
| 330 | case ZigLLVM_lanai: | |
| 331 | case ZigLLVM_hsail: | |
| 332 | case ZigLLVM_hsail64: | |
| 333 | case ZigLLVM_kalimba: | |
| 334 | case ZigLLVM_le32: | |
| 335 | case ZigLLVM_le64: | |
| 336 | case ZigLLVM_mips: | |
| 337 | case ZigLLVM_mips64: | |
| 338 | case ZigLLVM_mips64el: | |
| 339 | case ZigLLVM_mipsel: | |
| 340 | case ZigLLVM_msp430: | |
| 341 | case ZigLLVM_nvptx: | |
| 342 | case ZigLLVM_nvptx64: | |
| 343 | case ZigLLVM_ppc64le: | |
| 344 | case ZigLLVM_r600: | |
| 345 | case ZigLLVM_renderscript32: | |
| 346 | case ZigLLVM_renderscript64: | |
| 347 | case ZigLLVM_shave: | |
| 348 | case ZigLLVM_sparc: | |
| 349 | case ZigLLVM_sparcel: | |
| 350 | case ZigLLVM_sparcv9: | |
| 351 | case ZigLLVM_spir: | |
| 352 | case ZigLLVM_spir64: | |
| 353 | case ZigLLVM_systemz: | |
| 354 | case ZigLLVM_tce: | |
| 355 | case ZigLLVM_thumbeb: | |
| 356 | case ZigLLVM_wasm32: | |
| 357 | case ZigLLVM_wasm64: | |
| 358 | case ZigLLVM_xcore: | |
| 359 | target->oformat= ZigLLVM_ELF; | |
| 314 | 360 | return; |
| 315 | } | |
| 316 | target->oformat = ZigLLVM_ELF; | |
| 317 | return; | |
| 318 | } | |
| 319 | 361 | |
| 320 | if (is_os_darwin(target)) { | |
| 321 | target->oformat = ZigLLVM_MachO; | |
| 322 | return; | |
| 323 | } else if (target->os == ZigLLVM_Win32) { | |
| 324 | target->oformat = ZigLLVM_COFF; | |
| 325 | return; | |
| 362 | case ZigLLVM_ppc: | |
| 363 | case ZigLLVM_ppc64: | |
| 364 | if (is_os_darwin(target)) { | |
| 365 | target->oformat = ZigLLVM_MachO; | |
| 366 | } else { | |
| 367 | target->oformat= ZigLLVM_ELF; | |
| 368 | } | |
| 369 | return; | |
| 326 | 370 | } |
| 327 | target->oformat = ZigLLVM_ELF; | |
| 328 | 371 | } |
| 329 | 372 | |
| 330 | 373 | // See lib/Support/Triple.cpp in LLVM for the source of this data. |
| ... | ... | @@ -357,8 +400,10 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 357 | 400 | case ZigLLVM_hsail: |
| 358 | 401 | case ZigLLVM_spir: |
| 359 | 402 | case ZigLLVM_kalimba: |
| 403 | case ZigLLVM_lanai: | |
| 360 | 404 | case ZigLLVM_shave: |
| 361 | 405 | case ZigLLVM_wasm32: |
| 406 | case ZigLLVM_renderscript32: | |
| 362 | 407 | return 32; |
| 363 | 408 | |
| 364 | 409 | case ZigLLVM_aarch64: |
| ... | ... | @@ -379,6 +424,7 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 379 | 424 | case ZigLLVM_hsail64: |
| 380 | 425 | case ZigLLVM_spir64: |
| 381 | 426 | case ZigLLVM_wasm64: |
| 427 | case ZigLLVM_renderscript64: | |
| 382 | 428 | return 64; |
| 383 | 429 | } |
| 384 | 430 | zig_unreachable(); |
| ... | ... | @@ -446,6 +492,7 @@ int get_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 446 | 492 | case ZigLLVM_ELFIAMCU: |
| 447 | 493 | case ZigLLVM_TvOS: |
| 448 | 494 | case ZigLLVM_WatchOS: |
| 495 | case ZigLLVM_Mesa3D: | |
| 449 | 496 | zig_panic("TODO c type size in bits for this target"); |
| 450 | 497 | } |
| 451 | 498 | zig_unreachable(); |
src/zig_llvm.cpp+29-13| ... | ... | @@ -52,10 +52,6 @@ void LLVMZigInitializeLowerIntrinsicsPass(LLVMPassRegistryRef R) { |
| 52 | 52 | initializeLowerIntrinsicsPass(*unwrap(R)); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | void LLVMZigInitializeUnreachableBlockElimPass(LLVMPassRegistryRef R) { | |
| 56 | initializeUnreachableBlockElimPass(*unwrap(R)); | |
| 57 | } | |
| 58 | ||
| 59 | 55 | char *LLVMZigGetHostCPUName(void) { |
| 60 | 56 | std::string str = sys::getHostCPUName(); |
| 61 | 57 | return strdup(str.c_str()); |
| ... | ... | @@ -405,6 +401,22 @@ LLVMZigDILocalVariable *LLVMZigCreateAutoVariable(LLVMZigDIBuilder *dbuilder, |
| 405 | 401 | return reinterpret_cast<LLVMZigDILocalVariable*>(result); |
| 406 | 402 | } |
| 407 | 403 | |
| 404 | LLVMZigDIGlobalVariable *LLVMZigCreateGlobalVariable(LLVMZigDIBuilder *dbuilder, | |
| 405 | LLVMZigDIScope *scope, const char *name, const char *linkage_name, LLVMZigDIFile *file, | |
| 406 | unsigned line_no, LLVMZigDIType *di_type, bool is_local_to_unit, LLVMValueRef constant_val) | |
| 407 | { | |
| 408 | DIGlobalVariable *result = reinterpret_cast<DIBuilder*>(dbuilder)->createGlobalVariable( | |
| 409 | reinterpret_cast<DIScope*>(scope), | |
| 410 | name, | |
| 411 | linkage_name, | |
| 412 | reinterpret_cast<DIFile*>(file), | |
| 413 | line_no, | |
| 414 | reinterpret_cast<DIType*>(di_type), | |
| 415 | is_local_to_unit, | |
| 416 | reinterpret_cast<llvm::Constant *>(constant_val)); | |
| 417 | return reinterpret_cast<LLVMZigDIGlobalVariable*>(result); | |
| 418 | } | |
| 419 | ||
| 408 | 420 | LLVMZigDILocalVariable *LLVMZigCreateParameterVariable(LLVMZigDIBuilder *dbuilder, |
| 409 | 421 | LLVMZigDIScope *scope, const char *name, LLVMZigDIFile *file, unsigned line_no, |
| 410 | 422 | LLVMZigDIType *type, bool always_preserve, unsigned flags, unsigned arg_no) |
| ... | ... | @@ -452,11 +464,11 @@ LLVMZigDICompileUnit *LLVMZigCreateCompileUnit(LLVMZigDIBuilder *dibuilder, |
| 452 | 464 | uint64_t dwo_id, bool emit_debug_info) |
| 453 | 465 | { |
| 454 | 466 | DICompileUnit *result = reinterpret_cast<DIBuilder*>(dibuilder)->createCompileUnit( |
| 455 | lang, file, dir, producer, is_optimized, flags, runtime_version, split_name, | |
| 456 | DIBuilder::FullDebug, dwo_id, emit_debug_info); | |
| 467 | lang, file, dir, producer, is_optimized, flags, runtime_version, split_name); | |
| 457 | 468 | return reinterpret_cast<LLVMZigDICompileUnit*>(result); |
| 458 | 469 | } |
| 459 | 470 | |
| 471 | ||
| 460 | 472 | LLVMZigDIFile *LLVMZigCreateFile(LLVMZigDIBuilder *dibuilder, const char *filename, const char *directory) { |
| 461 | 473 | DIFile *result = reinterpret_cast<DIBuilder*>(dibuilder)->createFile(filename, directory); |
| 462 | 474 | return reinterpret_cast<LLVMZigDIFile*>(result); |
| ... | ... | @@ -603,6 +615,10 @@ const char *ZigLLVMGetSubArchTypeName(ZigLLVM_SubArchType sub_arch) { |
| 603 | 615 | return "v8_1a"; |
| 604 | 616 | case ZigLLVM_ARMSubArch_v8: |
| 605 | 617 | return "v8"; |
| 618 | case ZigLLVM_ARMSubArch_v8m_baseline: | |
| 619 | return "v8m_baseline"; | |
| 620 | case ZigLLVM_ARMSubArch_v8m_mainline: | |
| 621 | return "v8m_mainline"; | |
| 606 | 622 | case ZigLLVM_ARMSubArch_v7: |
| 607 | 623 | return "v7"; |
| 608 | 624 | case ZigLLVM_ARMSubArch_v7em: |
| ... | ... | @@ -648,13 +664,13 @@ unsigned ZigLLVMGetPrefTypeAlignment(LLVMTargetDataRef TD, LLVMTypeRef Ty) { |
| 648 | 664 | |
| 649 | 665 | static AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering Ordering) { |
| 650 | 666 | switch (Ordering) { |
| 651 | case LLVMAtomicOrderingNotAtomic: return NotAtomic; | |
| 652 | case LLVMAtomicOrderingUnordered: return Unordered; | |
| 653 | case LLVMAtomicOrderingMonotonic: return Monotonic; | |
| 654 | case LLVMAtomicOrderingAcquire: return Acquire; | |
| 655 | case LLVMAtomicOrderingRelease: return Release; | |
| 656 | case LLVMAtomicOrderingAcquireRelease: return AcquireRelease; | |
| 657 | case LLVMAtomicOrderingSequentiallyConsistent: return SequentiallyConsistent; | |
| 667 | case LLVMAtomicOrderingNotAtomic: return AtomicOrdering::NotAtomic; | |
| 668 | case LLVMAtomicOrderingUnordered: return AtomicOrdering::Unordered; | |
| 669 | case LLVMAtomicOrderingMonotonic: return AtomicOrdering::Monotonic; | |
| 670 | case LLVMAtomicOrderingAcquire: return AtomicOrdering::Acquire; | |
| 671 | case LLVMAtomicOrderingRelease: return AtomicOrdering::Release; | |
| 672 | case LLVMAtomicOrderingAcquireRelease: return AtomicOrdering::AcquireRelease; | |
| 673 | case LLVMAtomicOrderingSequentiallyConsistent: return AtomicOrdering::SequentiallyConsistent; | |
| 658 | 674 | } |
| 659 | 675 | abort(); |
| 660 | 676 | } |
src/zig_llvm.hpp+64-47| ... | ... | @@ -23,13 +23,13 @@ struct LLVMZigDILexicalBlock; |
| 23 | 23 | struct LLVMZigDISubprogram; |
| 24 | 24 | struct LLVMZigDISubroutineType; |
| 25 | 25 | struct LLVMZigDILocalVariable; |
| 26 | struct LLVMZigDIGlobalVariable; | |
| 26 | 27 | struct LLVMZigDILocation; |
| 27 | 28 | struct LLVMZigDIEnumerator; |
| 28 | 29 | struct LLVMZigInsertionPoint; |
| 29 | 30 | |
| 30 | 31 | void LLVMZigInitializeLoopStrengthReducePass(LLVMPassRegistryRef R); |
| 31 | 32 | void LLVMZigInitializeLowerIntrinsicsPass(LLVMPassRegistryRef R); |
| 32 | void LLVMZigInitializeUnreachableBlockElimPass(LLVMPassRegistryRef R); | |
| 33 | 33 | |
| 34 | 34 | char *LLVMZigGetHostCPUName(void); |
| 35 | 35 | char *LLVMZigGetNativeFeatures(void); |
| ... | ... | @@ -126,6 +126,10 @@ LLVMZigDILocalVariable *LLVMZigCreateAutoVariable(LLVMZigDIBuilder *dbuilder, |
| 126 | 126 | LLVMZigDIScope *scope, const char *name, LLVMZigDIFile *file, unsigned line_no, |
| 127 | 127 | LLVMZigDIType *type, bool always_preserve, unsigned flags); |
| 128 | 128 | |
| 129 | LLVMZigDIGlobalVariable *LLVMZigCreateGlobalVariable(LLVMZigDIBuilder *dbuilder, | |
| 130 | LLVMZigDIScope *scope, const char *name, const char *linkage_name, LLVMZigDIFile *file, | |
| 131 | unsigned line_no, LLVMZigDIType *di_type, bool is_local_to_unit, LLVMValueRef constant_val); | |
| 132 | ||
| 129 | 133 | LLVMZigDILocalVariable *LLVMZigCreateParameterVariable(LLVMZigDIBuilder *dbuilder, |
| 130 | 134 | LLVMZigDIScope *scope, const char *name, LLVMZigDIFile *file, unsigned line_no, |
| 131 | 135 | LLVMZigDIType *type, bool always_preserve, unsigned flags, unsigned arg_no); |
| ... | ... | @@ -170,50 +174,53 @@ unsigned ZigLLVMGetPrefTypeAlignment(LLVMTargetDataRef TD, LLVMTypeRef Ty); |
| 170 | 174 | enum ZigLLVM_ArchType { |
| 171 | 175 | ZigLLVM_UnknownArch, |
| 172 | 176 | |
| 173 | ZigLLVM_arm, // ARM (little endian): arm, armv.*, xscale | |
| 174 | ZigLLVM_armeb, // ARM (big endian): armeb | |
| 175 | ZigLLVM_aarch64, // AArch64 (little endian): aarch64 | |
| 176 | ZigLLVM_aarch64_be, // AArch64 (big endian): aarch64_be | |
| 177 | ZigLLVM_avr, // AVR: Atmel AVR microcontroller | |
| 178 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) | |
| 179 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) | |
| 180 | ZigLLVM_hexagon, // Hexagon: hexagon | |
| 181 | ZigLLVM_mips, // MIPS: mips, mipsallegrex | |
| 182 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexel | |
| 183 | ZigLLVM_mips64, // MIPS64: mips64 | |
| 184 | ZigLLVM_mips64el, // MIPS64EL: mips64el | |
| 185 | ZigLLVM_msp430, // MSP430: msp430 | |
| 186 | ZigLLVM_ppc, // PPC: powerpc | |
| 187 | ZigLLVM_ppc64, // PPC64: powerpc64, ppu | |
| 188 | ZigLLVM_ppc64le, // PPC64LE: powerpc64le | |
| 189 | ZigLLVM_r600, // R600: AMD GPUs HD2XXX - HD6XXX | |
| 190 | ZigLLVM_amdgcn, // AMDGCN: AMD GCN GPUs | |
| 191 | ZigLLVM_sparc, // Sparc: sparc | |
| 192 | ZigLLVM_sparcv9, // Sparcv9: Sparcv9 | |
| 193 | ZigLLVM_sparcel, // Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant | |
| 194 | ZigLLVM_systemz, // SystemZ: s390x | |
| 195 | ZigLLVM_tce, // TCE (http://tce.cs.tut.fi/): tce | |
| 196 | ZigLLVM_thumb, // Thumb (little endian): thumb, thumbv.* | |
| 197 | ZigLLVM_thumbeb, // Thumb (big endian): thumbeb | |
| 198 | ZigLLVM_x86, // X86: i[3-9]86 | |
| 199 | ZigLLVM_x86_64, // X86-64: amd64, x86_64 | |
| 200 | ZigLLVM_xcore, // XCore: xcore | |
| 201 | ZigLLVM_nvptx, // NVPTX: 32-bit | |
| 202 | ZigLLVM_nvptx64, // NVPTX: 64-bit | |
| 203 | ZigLLVM_le32, // le32: generic little-endian 32-bit CPU (PNaCl) | |
| 204 | ZigLLVM_le64, // le64: generic little-endian 64-bit CPU (PNaCl) | |
| 205 | ZigLLVM_amdil, // AMDIL | |
| 206 | ZigLLVM_amdil64, // AMDIL with 64-bit pointers | |
| 207 | ZigLLVM_hsail, // AMD HSAIL | |
| 208 | ZigLLVM_hsail64, // AMD HSAIL with 64-bit pointers | |
| 209 | ZigLLVM_spir, // SPIR: standard portable IR for OpenCL 32-bit version | |
| 210 | ZigLLVM_spir64, // SPIR: standard portable IR for OpenCL 64-bit version | |
| 211 | ZigLLVM_kalimba, // Kalimba: generic kalimba | |
| 212 | ZigLLVM_shave, // SHAVE: Movidius vector VLIW processors | |
| 213 | ZigLLVM_wasm32, // WebAssembly with 32-bit pointers | |
| 214 | ZigLLVM_wasm64, // WebAssembly with 64-bit pointers | |
| 215 | ||
| 216 | ZigLLVM_LastArchType = ZigLLVM_wasm64 | |
| 177 | ZigLLVM_arm, // ARM (little endian): arm, armv.*, xscale | |
| 178 | ZigLLVM_armeb, // ARM (big endian): armeb | |
| 179 | ZigLLVM_aarch64, // AArch64 (little endian): aarch64 | |
| 180 | ZigLLVM_aarch64_be, // AArch64 (big endian): aarch64_be | |
| 181 | ZigLLVM_avr, // AVR: Atmel AVR microcontroller | |
| 182 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) | |
| 183 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) | |
| 184 | ZigLLVM_hexagon, // Hexagon: hexagon | |
| 185 | ZigLLVM_mips, // MIPS: mips, mipsallegrex | |
| 186 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexel | |
| 187 | ZigLLVM_mips64, // MIPS64: mips64 | |
| 188 | ZigLLVM_mips64el, // MIPS64EL: mips64el | |
| 189 | ZigLLVM_msp430, // MSP430: msp430 | |
| 190 | ZigLLVM_ppc, // PPC: powerpc | |
| 191 | ZigLLVM_ppc64, // PPC64: powerpc64, ppu | |
| 192 | ZigLLVM_ppc64le, // PPC64LE: powerpc64le | |
| 193 | ZigLLVM_r600, // R600: AMD GPUs HD2XXX - HD6XXX | |
| 194 | ZigLLVM_amdgcn, // AMDGCN: AMD GCN GPUs | |
| 195 | ZigLLVM_sparc, // Sparc: sparc | |
| 196 | ZigLLVM_sparcv9, // Sparcv9: Sparcv9 | |
| 197 | ZigLLVM_sparcel, // Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant | |
| 198 | ZigLLVM_systemz, // SystemZ: s390x | |
| 199 | ZigLLVM_tce, // TCE (http://tce.cs.tut.fi/): tce | |
| 200 | ZigLLVM_thumb, // Thumb (little endian): thumb, thumbv.* | |
| 201 | ZigLLVM_thumbeb, // Thumb (big endian): thumbeb | |
| 202 | ZigLLVM_x86, // X86: i[3-9]86 | |
| 203 | ZigLLVM_x86_64, // X86-64: amd64, x86_64 | |
| 204 | ZigLLVM_xcore, // XCore: xcore | |
| 205 | ZigLLVM_nvptx, // NVPTX: 32-bit | |
| 206 | ZigLLVM_nvptx64, // NVPTX: 64-bit | |
| 207 | ZigLLVM_le32, // le32: generic little-endian 32-bit CPU (PNaCl) | |
| 208 | ZigLLVM_le64, // le64: generic little-endian 64-bit CPU (PNaCl) | |
| 209 | ZigLLVM_amdil, // AMDIL | |
| 210 | ZigLLVM_amdil64, // AMDIL with 64-bit pointers | |
| 211 | ZigLLVM_hsail, // AMD HSAIL | |
| 212 | ZigLLVM_hsail64, // AMD HSAIL with 64-bit pointers | |
| 213 | ZigLLVM_spir, // SPIR: standard portable IR for OpenCL 32-bit version | |
| 214 | ZigLLVM_spir64, // SPIR: standard portable IR for OpenCL 64-bit version | |
| 215 | ZigLLVM_kalimba, // Kalimba: generic kalimba | |
| 216 | ZigLLVM_shave, // SHAVE: Movidius vector VLIW processors | |
| 217 | ZigLLVM_lanai, // Lanai: Lanai 32-bit | |
| 218 | ZigLLVM_wasm32, // WebAssembly with 32-bit pointers | |
| 219 | ZigLLVM_wasm64, // WebAssembly with 64-bit pointers | |
| 220 | ZigLLVM_renderscript32, // 32-bit RenderScript | |
| 221 | ZigLLVM_renderscript64, // 64-bit RenderScript | |
| 222 | ||
| 223 | ZigLLVM_LastArchType = ZigLLVM_renderscript64 | |
| 217 | 224 | }; |
| 218 | 225 | |
| 219 | 226 | enum ZigLLVM_SubArchType { |
| ... | ... | @@ -222,6 +229,8 @@ enum ZigLLVM_SubArchType { |
| 222 | 229 | ZigLLVM_ARMSubArch_v8_2a, |
| 223 | 230 | ZigLLVM_ARMSubArch_v8_1a, |
| 224 | 231 | ZigLLVM_ARMSubArch_v8, |
| 232 | ZigLLVM_ARMSubArch_v8m_baseline, | |
| 233 | ZigLLVM_ARMSubArch_v8m_mainline, | |
| 225 | 234 | ZigLLVM_ARMSubArch_v7, |
| 226 | 235 | ZigLLVM_ARMSubArch_v7em, |
| 227 | 236 | ZigLLVM_ARMSubArch_v7m, |
| ... | ... | @@ -254,8 +263,10 @@ enum ZigLLVM_VendorType { |
| 254 | 263 | ZigLLVM_NVIDIA, |
| 255 | 264 | ZigLLVM_CSR, |
| 256 | 265 | ZigLLVM_Myriad, |
| 266 | ZigLLVM_AMD, | |
| 267 | ZigLLVM_Mesa, | |
| 257 | 268 | |
| 258 | ZigLLVM_LastVendorType = ZigLLVM_Myriad | |
| 269 | ZigLLVM_LastVendorType = ZigLLVM_Mesa | |
| 259 | 270 | }; |
| 260 | 271 | enum ZigLLVM_OSType { |
| 261 | 272 | ZigLLVM_UnknownOS, |
| ... | ... | @@ -287,13 +298,15 @@ enum ZigLLVM_OSType { |
| 287 | 298 | ZigLLVM_ELFIAMCU, |
| 288 | 299 | ZigLLVM_TvOS, // Apple tvOS |
| 289 | 300 | ZigLLVM_WatchOS, // Apple watchOS |
| 301 | ZigLLVM_Mesa3D, | |
| 290 | 302 | |
| 291 | ZigLLVM_LastOSType = ZigLLVM_WatchOS | |
| 303 | ZigLLVM_LastOSType = ZigLLVM_Mesa3D | |
| 292 | 304 | }; |
| 293 | 305 | enum ZigLLVM_EnvironmentType { |
| 294 | 306 | ZigLLVM_UnknownEnvironment, |
| 295 | 307 | |
| 296 | 308 | ZigLLVM_GNU, |
| 309 | ZigLLVM_GNUABI64, | |
| 297 | 310 | ZigLLVM_GNUEABI, |
| 298 | 311 | ZigLLVM_GNUEABIHF, |
| 299 | 312 | ZigLLVM_GNUX32, |
| ... | ... | @@ -301,12 +314,16 @@ enum ZigLLVM_EnvironmentType { |
| 301 | 314 | ZigLLVM_EABI, |
| 302 | 315 | ZigLLVM_EABIHF, |
| 303 | 316 | ZigLLVM_Android, |
| 317 | ZigLLVM_Musl, | |
| 318 | ZigLLVM_MuslEABI, | |
| 319 | ZigLLVM_MuslEABIHF, | |
| 304 | 320 | |
| 305 | 321 | ZigLLVM_MSVC, |
| 306 | 322 | ZigLLVM_Itanium, |
| 307 | 323 | ZigLLVM_Cygnus, |
| 308 | 324 | ZigLLVM_AMDOpenCL, |
| 309 | 325 | ZigLLVM_CoreCLR, |
| 326 | ||
| 310 | 327 | ZigLLVM_LastEnvironmentType = ZigLLVM_CoreCLR |
| 311 | 328 | }; |
| 312 | 329 | enum ZigLLVM_ObjectFormatType { |