| author | |
| committer | |
| log | 5466e87fce581f2ef90ac23bb80b1dbc05836fc6 |
| tree | 76924d4c30f3dfbd0e01ce8a7b3d8132bb4538b8 |
| parent | 397e055ddd944b2a730458b70c389f1c6588c058 |
* zig_clang is fully updated
* zig_llvm is fully updated
Some initial work on codegen.cpp is in place for upgrading to LLVM's
new opaque pointers. However there is much more to be done.
A few of zig llvm bindings for deprecated functions have been updated;
more need to be updated.9 files changed, 83 insertions(+), 76 deletions(-)
lib/std/target.zig+2-2| ... | ... | @@ -804,6 +804,8 @@ pub const Target = struct { |
| 804 | 804 | hsail64, |
| 805 | 805 | spir, |
| 806 | 806 | spir64, |
| 807 | spirv32, | |
| 808 | spirv64, | |
| 807 | 809 | kalimba, |
| 808 | 810 | shave, |
| 809 | 811 | lanai, |
| ... | ... | @@ -815,8 +817,6 @@ pub const Target = struct { |
| 815 | 817 | // Stage1 currently assumes that architectures above this comment |
| 816 | 818 | // map one-to-one with the ZigLLVM_ArchType enum. |
| 817 | 819 | spu_2, |
| 818 | spirv32, | |
| 819 | spirv64, | |
| 820 | 820 | |
| 821 | 821 | pub fn isX86(arch: Arch) bool { |
| 822 | 822 | return switch (arch) { |
src/clang.zig+6-2| ... | ... | @@ -1104,6 +1104,7 @@ pub const TypeClass = enum(c_int) { |
| 1104 | 1104 | VariableArray, |
| 1105 | 1105 | Atomic, |
| 1106 | 1106 | Attributed, |
| 1107 | BitInt, | |
| 1107 | 1108 | BlockPointer, |
| 1108 | 1109 | Builtin, |
| 1109 | 1110 | Complex, |
| ... | ... | @@ -1111,13 +1112,12 @@ pub const TypeClass = enum(c_int) { |
| 1111 | 1112 | Auto, |
| 1112 | 1113 | DeducedTemplateSpecialization, |
| 1113 | 1114 | DependentAddressSpace, |
| 1114 | DependentExtInt, | |
| 1115 | DependentBitInt, | |
| 1115 | 1116 | DependentName, |
| 1116 | 1117 | DependentSizedExtVector, |
| 1117 | 1118 | DependentTemplateSpecialization, |
| 1118 | 1119 | DependentVector, |
| 1119 | 1120 | Elaborated, |
| 1120 | ExtInt, | |
| 1121 | 1121 | FunctionNoProto, |
| 1122 | 1122 | FunctionProto, |
| 1123 | 1123 | InjectedClassName, |
| ... | ... | @@ -1146,6 +1146,7 @@ pub const TypeClass = enum(c_int) { |
| 1146 | 1146 | Typedef, |
| 1147 | 1147 | UnaryTransform, |
| 1148 | 1148 | UnresolvedUsing, |
| 1149 | Using, | |
| 1149 | 1150 | Vector, |
| 1150 | 1151 | ExtVector, |
| 1151 | 1152 | }; |
| ... | ... | @@ -1187,6 +1188,7 @@ const StmtClass = enum(c_int) { |
| 1187 | 1188 | OMPDistributeSimdDirectiveClass, |
| 1188 | 1189 | OMPForDirectiveClass, |
| 1189 | 1190 | OMPForSimdDirectiveClass, |
| 1191 | OMPGenericLoopDirectiveClass, | |
| 1190 | 1192 | OMPMasterTaskLoopDirectiveClass, |
| 1191 | 1193 | OMPMasterTaskLoopSimdDirectiveClass, |
| 1192 | 1194 | OMPParallelForDirectiveClass, |
| ... | ... | @@ -1210,6 +1212,7 @@ const StmtClass = enum(c_int) { |
| 1210 | 1212 | OMPUnrollDirectiveClass, |
| 1211 | 1213 | OMPMaskedDirectiveClass, |
| 1212 | 1214 | OMPMasterDirectiveClass, |
| 1215 | OMPMetaDirectiveClass, | |
| 1213 | 1216 | OMPOrderedDirectiveClass, |
| 1214 | 1217 | OMPParallelDirectiveClass, |
| 1215 | 1218 | OMPParallelMasterDirectiveClass, |
| ... | ... | @@ -1746,6 +1749,7 @@ pub const BuiltinTypeKind = enum(c_int) { |
| 1746 | 1749 | Float16, |
| 1747 | 1750 | BFloat16, |
| 1748 | 1751 | Float128, |
| 1752 | Ibm128, | |
| 1749 | 1753 | NullPtr, |
| 1750 | 1754 | ObjCId, |
| 1751 | 1755 | ObjCClass, |
src/codegen/llvm/bindings.zig+8-7| ... | ... | @@ -331,10 +331,11 @@ pub const Module = opaque { |
| 331 | 331 | pub const getLastGlobalAlias = LLVMGetLastGlobalAlias; |
| 332 | 332 | extern fn LLVMGetLastGlobalAlias(M: *const Module) *const Value; |
| 333 | 333 | |
| 334 | pub const addAlias = LLVMAddAlias; | |
| 335 | extern fn LLVMAddAlias( | |
| 334 | pub const addAlias = LLVMAddAlias2; | |
| 335 | extern fn LLVMAddAlias2( | |
| 336 | 336 | M: *const Module, |
| 337 | 337 | Ty: *const Type, |
| 338 | AddrSpace: c_uint, | |
| 338 | 339 | Aliasee: *const Value, |
| 339 | 340 | Name: [*:0]const u8, |
| 340 | 341 | ) *const Value; |
| ... | ... | @@ -458,8 +459,8 @@ pub const Builder = opaque { |
| 458 | 459 | pub const buildStore = LLVMBuildStore; |
| 459 | 460 | extern fn LLVMBuildStore(*const Builder, Val: *const Value, Ptr: *const Value) *const Value; |
| 460 | 461 | |
| 461 | pub const buildLoad = LLVMBuildLoad; | |
| 462 | extern fn LLVMBuildLoad(*const Builder, PointerVal: *const Value, Name: [*:0]const u8) *const Value; | |
| 462 | pub const buildLoad = LLVMBuildLoad2; | |
| 463 | extern fn LLVMBuildLoad2(*const Builder, Ty: *const Type, PointerVal: *const Value, Name: [*:0]const u8) *const Value; | |
| 463 | 464 | |
| 464 | 465 | pub const buildNeg = LLVMBuildNeg; |
| 465 | 466 | extern fn LLVMBuildNeg(*const Builder, V: *const Value, Name: [*:0]const u8) *const Value; |
| ... | ... | @@ -1067,9 +1068,9 @@ pub extern fn LLVMInitializeM68kAsmParser() void; |
| 1067 | 1068 | pub extern fn LLVMInitializeCSKYAsmParser() void; |
| 1068 | 1069 | pub extern fn LLVMInitializeVEAsmParser() void; |
| 1069 | 1070 | |
| 1070 | extern fn ZigLLDLinkCOFF(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool) c_int; | |
| 1071 | extern fn ZigLLDLinkELF(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool) c_int; | |
| 1072 | extern fn ZigLLDLinkWasm(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool) c_int; | |
| 1071 | extern fn ZigLLDLinkCOFF(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool, disable_output: bool) c_int; | |
| 1072 | extern fn ZigLLDLinkELF(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool, disable_output: bool) c_int; | |
| 1073 | extern fn ZigLLDLinkWasm(argc: c_int, argv: [*:null]const ?[*:0]const u8, can_exit_early: bool, disable_output: bool) c_int; | |
| 1073 | 1074 | |
| 1074 | 1075 | pub const LinkCOFF = ZigLLDLinkCOFF; |
| 1075 | 1076 | pub const LinkELF = ZigLLDLinkELF; |
src/stage1/codegen.cpp+12-9| ... | ... | @@ -490,7 +490,7 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) { |
| 490 | 490 | |
| 491 | 491 | for (size_t i = 1; i < fn->export_list.length; i += 1) { |
| 492 | 492 | GlobalExport *fn_export = &fn->export_list.items[i]; |
| 493 | LLVMAddAlias(g->module, LLVMTypeOf(llvm_fn), llvm_fn, buf_ptr(&fn_export->name)); | |
| 493 | LLVMAddAlias2(g->module, LLVMTypeOf(llvm_fn), 0, llvm_fn, buf_ptr(&fn_export->name)); | |
| 494 | 494 | } |
| 495 | 495 | } |
| 496 | 496 | |
| ... | ... | @@ -901,10 +901,10 @@ static LLVMValueRef gen_store(CodeGen *g, LLVMValueRef value, LLVMValueRef ptr, |
| 901 | 901 | return gen_store_untyped(g, value, ptr, alignment, ptr_type->data.pointer.is_volatile); |
| 902 | 902 | } |
| 903 | 903 | |
| 904 | static LLVMValueRef gen_load_untyped(CodeGen *g, LLVMValueRef ptr, uint32_t alignment, bool is_volatile, | |
| 905 | const char *name) | |
| 904 | static LLVMValueRef gen_load_untyped(CodeGen *g, LLVMTypeRef elem_type, LLVMValueRef ptr, | |
| 905 | uint32_t alignment, bool is_volatile, const char *name) | |
| 906 | 906 | { |
| 907 | LLVMValueRef result = LLVMBuildLoad(g->builder, ptr, name); | |
| 907 | LLVMValueRef result = LLVMBuildLoad2(g->builder, elem_type, ptr, name); | |
| 908 | 908 | if (is_volatile) LLVMSetVolatile(result, true); |
| 909 | 909 | if (alignment == 0) { |
| 910 | 910 | LLVMSetAlignment(result, LLVMABIAlignmentOfType(g->target_data_ref, LLVMGetElementType(LLVMTypeOf(ptr)))); |
| ... | ... | @@ -916,8 +916,10 @@ static LLVMValueRef gen_load_untyped(CodeGen *g, LLVMValueRef ptr, uint32_t alig |
| 916 | 916 | |
| 917 | 917 | static LLVMValueRef gen_load(CodeGen *g, LLVMValueRef ptr, ZigType *ptr_type, const char *name) { |
| 918 | 918 | assert(ptr_type->id == ZigTypeIdPointer); |
| 919 | ZigType *elem_type = ptr_type->data.pointer.child_type; | |
| 919 | 920 | uint32_t alignment = get_ptr_align(g, ptr_type); |
| 920 | return gen_load_untyped(g, ptr, alignment, ptr_type->data.pointer.is_volatile, name); | |
| 921 | return gen_load_untyped(g, get_llvm_type(g, elem_type), ptr, alignment, | |
| 922 | ptr_type->data.pointer.is_volatile, name); | |
| 921 | 923 | } |
| 922 | 924 | |
| 923 | 925 | static LLVMValueRef get_handle_value(CodeGen *g, LLVMValueRef ptr, ZigType *type, ZigType *ptr_type) { |
| ... | ... | @@ -1265,15 +1267,16 @@ static LLVMValueRef get_add_error_return_trace_addr_fn(CodeGen *g) { |
| 1265 | 1267 | size_t len_field_index = slice_type->data.structure.fields[slice_len_index]->gen_index; |
| 1266 | 1268 | LLVMValueRef len_field_ptr = LLVMBuildStructGEP(g->builder, addresses_field_ptr, (unsigned)len_field_index, ""); |
| 1267 | 1269 | |
| 1268 | LLVMValueRef len_value = gen_load_untyped(g, len_field_ptr, 0, false, ""); | |
| 1269 | LLVMValueRef index_val = gen_load_untyped(g, index_field_ptr, 0, false, ""); | |
| 1270 | LLVMValueRef len_value = gen_load_untyped(g, usize_type_ref, len_field_ptr, 0, false, ""); | |
| 1271 | LLVMValueRef index_val = gen_load_untyped(g, usize_type_ref, index_field_ptr, 0, false, ""); | |
| 1270 | 1272 | LLVMValueRef len_val_minus_one = LLVMBuildSub(g->builder, len_value, LLVMConstInt(usize_type_ref, 1, false), ""); |
| 1271 | 1273 | LLVMValueRef masked_val = LLVMBuildAnd(g->builder, index_val, len_val_minus_one, ""); |
| 1272 | 1274 | LLVMValueRef address_indices[] = { |
| 1273 | 1275 | masked_val, |
| 1274 | 1276 | }; |
| 1275 | 1277 | |
| 1276 | LLVMValueRef ptr_value = gen_load_untyped(g, ptr_field_ptr, 0, false, ""); | |
| 1278 | LLVMTypeRef ptr_to_usize = LLVMPointerType(usize_type_ref, 0); | |
| 1279 | LLVMValueRef ptr_value = gen_load_untyped(g, ptr_to_usize, ptr_field_ptr, 0, false, ""); | |
| 1277 | 1280 | LLVMValueRef address_slot = LLVMBuildInBoundsGEP(g->builder, ptr_value, address_indices, 1, ""); |
| 1278 | 1281 | |
| 1279 | 1282 | gen_store_untyped(g, address_value, address_slot, 0, false); |
| ... | ... | @@ -8802,7 +8805,7 @@ static void do_code_gen(CodeGen *g) { |
| 8802 | 8805 | |
| 8803 | 8806 | for (size_t export_i = 1; export_i < var->export_list.length; export_i += 1) { |
| 8804 | 8807 | GlobalExport *global_export = &var->export_list.items[export_i]; |
| 8805 | LLVMAddAlias(g->module, LLVMTypeOf(var->value_ref), var->value_ref, buf_ptr(&global_export->name)); | |
| 8808 | LLVMAddAlias2(g->module, LLVMTypeOf(var->value_ref), 0, var->value_ref, buf_ptr(&global_export->name)); | |
| 8806 | 8809 | } |
| 8807 | 8810 | } |
| 8808 | 8811 |
src/stage1/target.cpp+2| ... | ... | @@ -60,6 +60,8 @@ static const ZigLLVM_ArchType arch_list[] = { |
| 60 | 60 | ZigLLVM_hsail64, // AMD HSAIL with 64-bit pointers |
| 61 | 61 | ZigLLVM_spir, // SPIR: standard portable IR for OpenCL 32-bit version |
| 62 | 62 | ZigLLVM_spir64, // SPIR: standard portable IR for OpenCL 64-bit version |
| 63 | ZigLLVM_spirv32, // SPIR-V with 32-bit pointers | |
| 64 | ZigLLVM_spirv64, // SPIR-V with 64-bit pointers | |
| 63 | 65 | ZigLLVM_kalimba, // Kalimba: generic kalimba |
| 64 | 66 | ZigLLVM_shave, // SHAVE: Movidius vector VLIW processors |
| 65 | 67 | ZigLLVM_lanai, // Lanai: Lanai 32-bit |
src/zig_clang.cpp+12-4| ... | ... | @@ -294,13 +294,14 @@ void ZigClang_detect_enum_TypeClass(clang::Type::TypeClass ty) { |
| 294 | 294 | case clang::Type::DependentSizedArray: |
| 295 | 295 | case clang::Type::DependentSizedExtVector: |
| 296 | 296 | case clang::Type::DependentAddressSpace: |
| 297 | case clang::Type::DependentExtInt: | |
| 297 | case clang::Type::DependentBitInt: | |
| 298 | 298 | case clang::Type::Vector: |
| 299 | 299 | case clang::Type::DependentVector: |
| 300 | 300 | case clang::Type::ExtVector: |
| 301 | 301 | case clang::Type::FunctionProto: |
| 302 | 302 | case clang::Type::FunctionNoProto: |
| 303 | 303 | case clang::Type::UnresolvedUsing: |
| 304 | case clang::Type::Using: | |
| 304 | 305 | case clang::Type::Paren: |
| 305 | 306 | case clang::Type::Typedef: |
| 306 | 307 | case clang::Type::MacroQualified: |
| ... | ... | @@ -315,8 +316,8 @@ void ZigClang_detect_enum_TypeClass(clang::Type::TypeClass ty) { |
| 315 | 316 | case clang::Type::Record: |
| 316 | 317 | case clang::Type::Enum: |
| 317 | 318 | case clang::Type::Elaborated: |
| 318 | case clang::Type::ExtInt: | |
| 319 | 319 | case clang::Type::Attributed: |
| 320 | case clang::Type::BitInt: | |
| 320 | 321 | case clang::Type::TemplateTypeParm: |
| 321 | 322 | case clang::Type::SubstTemplateTypeParm: |
| 322 | 323 | case clang::Type::SubstTemplateTypeParmPack: |
| ... | ... | @@ -345,6 +346,7 @@ static_assert((clang::Type::TypeClass)ZigClangType_IncompleteArray == clang::Typ |
| 345 | 346 | static_assert((clang::Type::TypeClass)ZigClangType_VariableArray == clang::Type::VariableArray, ""); |
| 346 | 347 | static_assert((clang::Type::TypeClass)ZigClangType_Atomic == clang::Type::Atomic, ""); |
| 347 | 348 | static_assert((clang::Type::TypeClass)ZigClangType_Attributed == clang::Type::Attributed, ""); |
| 349 | static_assert((clang::Type::TypeClass)ZigClangType_BitInt == clang::Type::BitInt, ""); | |
| 348 | 350 | static_assert((clang::Type::TypeClass)ZigClangType_BlockPointer == clang::Type::BlockPointer, ""); |
| 349 | 351 | static_assert((clang::Type::TypeClass)ZigClangType_Builtin == clang::Type::Builtin, ""); |
| 350 | 352 | static_assert((clang::Type::TypeClass)ZigClangType_Complex == clang::Type::Complex, ""); |
| ... | ... | @@ -352,13 +354,12 @@ static_assert((clang::Type::TypeClass)ZigClangType_Decltype == clang::Type::Decl |
| 352 | 354 | static_assert((clang::Type::TypeClass)ZigClangType_Auto == clang::Type::Auto, ""); |
| 353 | 355 | static_assert((clang::Type::TypeClass)ZigClangType_DeducedTemplateSpecialization == clang::Type::DeducedTemplateSpecialization, ""); |
| 354 | 356 | static_assert((clang::Type::TypeClass)ZigClangType_DependentAddressSpace == clang::Type::DependentAddressSpace, ""); |
| 355 | static_assert((clang::Type::TypeClass)ZigClangType_DependentExtInt == clang::Type::DependentExtInt, ""); | |
| 357 | static_assert((clang::Type::TypeClass)ZigClangType_DependentBitInt == clang::Type::DependentBitInt, ""); | |
| 356 | 358 | static_assert((clang::Type::TypeClass)ZigClangType_DependentName == clang::Type::DependentName, ""); |
| 357 | 359 | static_assert((clang::Type::TypeClass)ZigClangType_DependentSizedExtVector == clang::Type::DependentSizedExtVector, ""); |
| 358 | 360 | static_assert((clang::Type::TypeClass)ZigClangType_DependentTemplateSpecialization == clang::Type::DependentTemplateSpecialization, ""); |
| 359 | 361 | static_assert((clang::Type::TypeClass)ZigClangType_DependentVector == clang::Type::DependentVector, ""); |
| 360 | 362 | static_assert((clang::Type::TypeClass)ZigClangType_Elaborated == clang::Type::Elaborated, ""); |
| 361 | static_assert((clang::Type::TypeClass)ZigClangType_ExtInt == clang::Type::ExtInt, ""); | |
| 362 | 363 | static_assert((clang::Type::TypeClass)ZigClangType_FunctionNoProto == clang::Type::FunctionNoProto, ""); |
| 363 | 364 | static_assert((clang::Type::TypeClass)ZigClangType_FunctionProto == clang::Type::FunctionProto, ""); |
| 364 | 365 | static_assert((clang::Type::TypeClass)ZigClangType_InjectedClassName == clang::Type::InjectedClassName, ""); |
| ... | ... | @@ -387,6 +388,7 @@ static_assert((clang::Type::TypeClass)ZigClangType_TypeOf == clang::Type::TypeOf |
| 387 | 388 | static_assert((clang::Type::TypeClass)ZigClangType_Typedef == clang::Type::Typedef, ""); |
| 388 | 389 | static_assert((clang::Type::TypeClass)ZigClangType_UnaryTransform == clang::Type::UnaryTransform, ""); |
| 389 | 390 | static_assert((clang::Type::TypeClass)ZigClangType_UnresolvedUsing == clang::Type::UnresolvedUsing, ""); |
| 391 | static_assert((clang::Type::TypeClass)ZigClangType_Using == clang::Type::Using, ""); | |
| 390 | 392 | static_assert((clang::Type::TypeClass)ZigClangType_Vector == clang::Type::Vector, ""); |
| 391 | 393 | static_assert((clang::Type::TypeClass)ZigClangType_ExtVector == clang::Type::ExtVector, ""); |
| 392 | 394 | |
| ... | ... | @@ -429,6 +431,7 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) { |
| 429 | 431 | case clang::Stmt::OMPDistributeSimdDirectiveClass: |
| 430 | 432 | case clang::Stmt::OMPForDirectiveClass: |
| 431 | 433 | case clang::Stmt::OMPForSimdDirectiveClass: |
| 434 | case clang::Stmt::OMPGenericLoopDirectiveClass: | |
| 432 | 435 | case clang::Stmt::OMPMasterTaskLoopDirectiveClass: |
| 433 | 436 | case clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass: |
| 434 | 437 | case clang::Stmt::OMPParallelForDirectiveClass: |
| ... | ... | @@ -452,6 +455,7 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) { |
| 452 | 455 | case clang::Stmt::OMPUnrollDirectiveClass: |
| 453 | 456 | case clang::Stmt::OMPMaskedDirectiveClass: |
| 454 | 457 | case clang::Stmt::OMPMasterDirectiveClass: |
| 458 | case clang::Stmt::OMPMetaDirectiveClass: | |
| 455 | 459 | case clang::Stmt::OMPOrderedDirectiveClass: |
| 456 | 460 | case clang::Stmt::OMPParallelDirectiveClass: |
| 457 | 461 | case clang::Stmt::OMPParallelMasterDirectiveClass: |
| ... | ... | @@ -654,6 +658,7 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeParallelForSimdD |
| 654 | 658 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeSimdDirectiveClass == clang::Stmt::OMPDistributeSimdDirectiveClass, ""); |
| 655 | 659 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForDirectiveClass == clang::Stmt::OMPForDirectiveClass, ""); |
| 656 | 660 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForSimdDirectiveClass == clang::Stmt::OMPForSimdDirectiveClass, ""); |
| 661 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPGenericLoopDirectiveClass == clang::Stmt::OMPGenericLoopDirectiveClass, ""); | |
| 657 | 662 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopDirectiveClass == clang::Stmt::OMPMasterTaskLoopDirectiveClass, ""); |
| 658 | 663 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass == clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass, ""); |
| 659 | 664 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelForDirectiveClass == clang::Stmt::OMPParallelForDirectiveClass, ""); |
| ... | ... | @@ -677,6 +682,7 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTileDirectiveClass == clan |
| 677 | 682 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPUnrollDirectiveClass == clang::Stmt::OMPUnrollDirectiveClass, ""); |
| 678 | 683 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedDirectiveClass == clang::Stmt::OMPMaskedDirectiveClass, ""); |
| 679 | 684 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterDirectiveClass == clang::Stmt::OMPMasterDirectiveClass, ""); |
| 685 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMetaDirectiveClass == clang::Stmt::OMPMetaDirectiveClass, ""); | |
| 680 | 686 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPOrderedDirectiveClass == clang::Stmt::OMPOrderedDirectiveClass, ""); |
| 681 | 687 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelDirectiveClass == clang::Stmt::OMPParallelDirectiveClass, ""); |
| 682 | 688 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterDirectiveClass == clang::Stmt::OMPParallelMasterDirectiveClass, ""); |
| ... | ... | @@ -1269,6 +1275,7 @@ void ZigClang_detect_enum_BuiltinTypeKind(clang::BuiltinType::Kind x) { |
| 1269 | 1275 | case clang::BuiltinType::Float16: |
| 1270 | 1276 | case clang::BuiltinType::BFloat16: |
| 1271 | 1277 | case clang::BuiltinType::Float128: |
| 1278 | case clang::BuiltinType::Ibm128: | |
| 1272 | 1279 | case clang::BuiltinType::NullPtr: |
| 1273 | 1280 | case clang::BuiltinType::ObjCId: |
| 1274 | 1281 | case clang::BuiltinType::ObjCClass: |
| ... | ... | @@ -1510,6 +1517,7 @@ static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLongDouble == clang:: |
| 1510 | 1517 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFloat16 == clang::BuiltinType::Float16, ""); |
| 1511 | 1518 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBFloat16 == clang::BuiltinType::BFloat16, ""); |
| 1512 | 1519 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFloat128 == clang::BuiltinType::Float128, ""); |
| 1520 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeIbm128 == clang::BuiltinType::Ibm128, ""); | |
| 1513 | 1521 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeNullPtr == clang::BuiltinType::NullPtr, ""); |
| 1514 | 1522 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeObjCId == clang::BuiltinType::ObjCId, ""); |
| 1515 | 1523 | static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeObjCClass == clang::BuiltinType::ObjCClass, ""); |
src/zig_clang.h+6-2| ... | ... | @@ -251,6 +251,7 @@ enum ZigClangTypeClass { |
| 251 | 251 | ZigClangType_VariableArray, |
| 252 | 252 | ZigClangType_Atomic, |
| 253 | 253 | ZigClangType_Attributed, |
| 254 | ZigClangType_BitInt, | |
| 254 | 255 | ZigClangType_BlockPointer, |
| 255 | 256 | ZigClangType_Builtin, |
| 256 | 257 | ZigClangType_Complex, |
| ... | ... | @@ -258,13 +259,12 @@ enum ZigClangTypeClass { |
| 258 | 259 | ZigClangType_Auto, |
| 259 | 260 | ZigClangType_DeducedTemplateSpecialization, |
| 260 | 261 | ZigClangType_DependentAddressSpace, |
| 261 | ZigClangType_DependentExtInt, | |
| 262 | ZigClangType_DependentBitInt, | |
| 262 | 263 | ZigClangType_DependentName, |
| 263 | 264 | ZigClangType_DependentSizedExtVector, |
| 264 | 265 | ZigClangType_DependentTemplateSpecialization, |
| 265 | 266 | ZigClangType_DependentVector, |
| 266 | 267 | ZigClangType_Elaborated, |
| 267 | ZigClangType_ExtInt, | |
| 268 | 268 | ZigClangType_FunctionNoProto, |
| 269 | 269 | ZigClangType_FunctionProto, |
| 270 | 270 | ZigClangType_InjectedClassName, |
| ... | ... | @@ -293,6 +293,7 @@ enum ZigClangTypeClass { |
| 293 | 293 | ZigClangType_Typedef, |
| 294 | 294 | ZigClangType_UnaryTransform, |
| 295 | 295 | ZigClangType_UnresolvedUsing, |
| 296 | ZigClangType_Using, | |
| 296 | 297 | ZigClangType_Vector, |
| 297 | 298 | ZigClangType_ExtVector, |
| 298 | 299 | }; |
| ... | ... | @@ -334,6 +335,7 @@ enum ZigClangStmtClass { |
| 334 | 335 | ZigClangStmt_OMPDistributeSimdDirectiveClass, |
| 335 | 336 | ZigClangStmt_OMPForDirectiveClass, |
| 336 | 337 | ZigClangStmt_OMPForSimdDirectiveClass, |
| 338 | ZigClangStmt_OMPGenericLoopDirectiveClass, | |
| 337 | 339 | ZigClangStmt_OMPMasterTaskLoopDirectiveClass, |
| 338 | 340 | ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass, |
| 339 | 341 | ZigClangStmt_OMPParallelForDirectiveClass, |
| ... | ... | @@ -357,6 +359,7 @@ enum ZigClangStmtClass { |
| 357 | 359 | ZigClangStmt_OMPUnrollDirectiveClass, |
| 358 | 360 | ZigClangStmt_OMPMaskedDirectiveClass, |
| 359 | 361 | ZigClangStmt_OMPMasterDirectiveClass, |
| 362 | ZigClangStmt_OMPMetaDirectiveClass, | |
| 360 | 363 | ZigClangStmt_OMPOrderedDirectiveClass, |
| 361 | 364 | ZigClangStmt_OMPParallelDirectiveClass, |
| 362 | 365 | ZigClangStmt_OMPParallelMasterDirectiveClass, |
| ... | ... | @@ -893,6 +896,7 @@ enum ZigClangBuiltinTypeKind { |
| 893 | 896 | ZigClangBuiltinTypeFloat16, |
| 894 | 897 | ZigClangBuiltinTypeBFloat16, |
| 895 | 898 | ZigClangBuiltinTypeFloat128, |
| 899 | ZigClangBuiltinTypeIbm128, | |
| 896 | 900 | ZigClangBuiltinTypeNullPtr, |
| 897 | 901 | ZigClangBuiltinTypeObjCId, |
| 898 | 902 | ZigClangBuiltinTypeObjCClass, |
src/zig_llvm.cpp+30-47| ... | ... | @@ -35,6 +35,8 @@ |
| 35 | 35 | #include <llvm/IR/Verifier.h> |
| 36 | 36 | #include <llvm/InitializePasses.h> |
| 37 | 37 | #include <llvm/MC/SubtargetFeature.h> |
| 38 | #include <llvm/MC/TargetRegistry.h> | |
| 39 | #include <llvm/Passes/OptimizationLevel.h> | |
| 38 | 40 | #include <llvm/Passes/PassBuilder.h> |
| 39 | 41 | #include <llvm/Passes/StandardInstrumentations.h> |
| 40 | 42 | #include <llvm/Object/Archive.h> |
| ... | ... | @@ -51,7 +53,6 @@ |
| 51 | 53 | #include <llvm/Support/TimeProfiler.h> |
| 52 | 54 | #include <llvm/Support/Timer.h> |
| 53 | 55 | #include <llvm/Support/raw_ostream.h> |
| 54 | #include <llvm/Support/TargetRegistry.h> | |
| 55 | 56 | #include <llvm/Target/TargetMachine.h> |
| 56 | 57 | #include <llvm/Target/CodeGenCWrappers.h> |
| 57 | 58 | #include <llvm/Transforms/IPO.h> |
| ... | ... | @@ -273,7 +274,7 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 273 | 274 | TargetMachine &target_machine = *reinterpret_cast<TargetMachine*>(targ_machine_ref); |
| 274 | 275 | target_machine.setO0WantsFastISel(true); |
| 275 | 276 | |
| 276 | Module &module = *unwrap(module_ref); | |
| 277 | Module &llvm_module = *unwrap(module_ref); | |
| 277 | 278 | |
| 278 | 279 | // Pipeline configurations |
| 279 | 280 | PipelineTuningOptions pipeline_opts; |
| ... | ... | @@ -290,7 +291,6 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 290 | 291 | |
| 291 | 292 | PassBuilder pass_builder(&target_machine, pipeline_opts, |
| 292 | 293 | None, &instr_callbacks); |
| 293 | using OptimizationLevel = typename PassBuilder::OptimizationLevel; | |
| 294 | 294 | |
| 295 | 295 | LoopAnalysisManager loop_am; |
| 296 | 296 | FunctionAnalysisManager function_am; |
| ... | ... | @@ -302,7 +302,7 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 302 | 302 | return pass_builder.buildDefaultAAPipeline(); |
| 303 | 303 | }); |
| 304 | 304 | |
| 305 | Triple target_triple(module.getTargetTriple()); | |
| 305 | Triple target_triple(llvm_module.getTargetTriple()); | |
| 306 | 306 | auto tlii = std::make_unique<TargetLibraryInfoImpl>(target_triple); |
| 307 | 307 | function_am.registerPass([&] { return TargetLibraryAnalysis(*tlii); }); |
| 308 | 308 | |
| ... | ... | @@ -339,9 +339,9 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 339 | 339 | |
| 340 | 340 | // Thread sanitizer |
| 341 | 341 | if (tsan) { |
| 342 | pass_builder.registerOptimizerLastEPCallback( | |
| 343 | [](ModulePassManager &module_pm, OptimizationLevel level) { | |
| 344 | module_pm.addPass(ThreadSanitizerPass()); | |
| 342 | pass_builder.registerOptimizerLastEPCallback([](ModulePassManager &module_pm, OptimizationLevel level) { | |
| 343 | module_pm.addPass(ModuleThreadSanitizerPass()); | |
| 344 | module_pm.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass())); | |
| 345 | 345 | }); |
| 346 | 346 | } |
| 347 | 347 | |
| ... | ... | @@ -383,10 +383,10 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | // Optimization phase |
| 386 | module_pm.run(module, module_am); | |
| 386 | module_pm.run(llvm_module, module_am); | |
| 387 | 387 | |
| 388 | 388 | // Code generation phase |
| 389 | codegen_pm.run(module); | |
| 389 | codegen_pm.run(llvm_module); | |
| 390 | 390 | |
| 391 | 391 | if (llvm_ir_filename) { |
| 392 | 392 | if (LLVMPrintModuleToFile(module_ref, llvm_ir_filename, error_message)) { |
| ... | ... | @@ -395,10 +395,10 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | if (dest_bin && lto) { |
| 398 | WriteBitcodeToFile(module, *dest_bin); | |
| 398 | WriteBitcodeToFile(llvm_module, *dest_bin); | |
| 399 | 399 | } |
| 400 | 400 | if (dest_bitcode) { |
| 401 | WriteBitcodeToFile(module, *dest_bitcode); | |
| 401 | WriteBitcodeToFile(llvm_module, *dest_bitcode); | |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | if (time_report) { |
| ... | ... | @@ -421,7 +421,7 @@ LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *A |
| 421 | 421 | unsigned NumArgs, ZigLLVM_CallingConv CC, ZigLLVM_CallAttr attr, const char *Name) |
| 422 | 422 | { |
| 423 | 423 | Value *V = unwrap(Fn); |
| 424 | FunctionType *FnT = cast<FunctionType>(cast<PointerType>(V->getType())->getElementType()); | |
| 424 | FunctionType *FnT = cast<FunctionType>(V->getType()->getNonOpaquePointerElementType()); | |
| 425 | 425 | CallInst *call_inst = CallInst::Create(FnT, V, makeArrayRef(unwrap(Args), NumArgs), Name); |
| 426 | 426 | call_inst->setCallingConv(static_cast<CallingConv::ID>(CC)); |
| 427 | 427 | switch (attr) { |
| ... | ... | @@ -431,13 +431,13 @@ LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *A |
| 431 | 431 | call_inst->setTailCallKind(CallInst::TCK_NoTail); |
| 432 | 432 | break; |
| 433 | 433 | case ZigLLVM_CallAttrNeverInline: |
| 434 | call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::NoInline); | |
| 434 | call_inst->addFnAttr(Attribute::NoInline); | |
| 435 | 435 | break; |
| 436 | 436 | case ZigLLVM_CallAttrAlwaysTail: |
| 437 | 437 | call_inst->setTailCallKind(CallInst::TCK_MustTail); |
| 438 | 438 | break; |
| 439 | 439 | case ZigLLVM_CallAttrAlwaysInline: |
| 440 | call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::AlwaysInline); | |
| 440 | call_inst->addFnAttr(Attribute::AlwaysInline); | |
| 441 | 441 | break; |
| 442 | 442 | } |
| 443 | 443 | return wrap(unwrap(B)->Insert(call_inst)); |
| ... | ... | @@ -972,44 +972,28 @@ void ZigLLVMSetFastMath(LLVMBuilderRef builder_wrapped, bool on_state) { |
| 972 | 972 | |
| 973 | 973 | void ZigLLVMAddByValAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_val) { |
| 974 | 974 | Function *func = unwrap<Function>(fn_ref); |
| 975 | const AttributeList attr_set = func->getAttributes(); | |
| 976 | AttrBuilder attr_builder; | |
| 975 | AttrBuilder attr_builder(func->getContext()); | |
| 977 | 976 | Type *llvm_type = unwrap<Type>(type_val); |
| 978 | 977 | attr_builder.addByValAttr(llvm_type); |
| 979 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), ArgNo + 1, attr_builder); | |
| 980 | func->setAttributes(new_attr_set); | |
| 978 | func->addParamAttrs(ArgNo + 1, attr_builder); | |
| 981 | 979 | } |
| 982 | 980 | |
| 983 | 981 | void ZigLLVMAddSretAttr(LLVMValueRef fn_ref, unsigned ArgNo, LLVMTypeRef type_val) { |
| 984 | 982 | Function *func = unwrap<Function>(fn_ref); |
| 985 | const AttributeList attr_set = func->getAttributes(); | |
| 986 | AttrBuilder attr_builder; | |
| 983 | AttrBuilder attr_builder(func->getContext()); | |
| 987 | 984 | Type *llvm_type = unwrap<Type>(type_val); |
| 988 | 985 | attr_builder.addStructRetAttr(llvm_type); |
| 989 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), ArgNo + 1, attr_builder); | |
| 990 | func->setAttributes(new_attr_set); | |
| 986 | func->addParamAttrs(ArgNo + 1, attr_builder); | |
| 991 | 987 | } |
| 992 | 988 | |
| 993 | 989 | void ZigLLVMAddFunctionAttr(LLVMValueRef fn_ref, const char *attr_name, const char *attr_value) { |
| 994 | 990 | Function *func = unwrap<Function>(fn_ref); |
| 995 | const AttributeList attr_set = func->getAttributes(); | |
| 996 | AttrBuilder attr_builder; | |
| 997 | if (attr_value) { | |
| 998 | attr_builder.addAttribute(attr_name, attr_value); | |
| 999 | } else { | |
| 1000 | attr_builder.addAttribute(attr_name); | |
| 1001 | } | |
| 1002 | const AttributeList new_attr_set = attr_set.addAttributes(func->getContext(), | |
| 1003 | AttributeList::FunctionIndex, attr_builder); | |
| 1004 | func->setAttributes(new_attr_set); | |
| 991 | func->addFnAttr(attr_name, attr_value); | |
| 1005 | 992 | } |
| 1006 | 993 | |
| 1007 | 994 | void ZigLLVMAddFunctionAttrCold(LLVMValueRef fn_ref) { |
| 1008 | 995 | Function *func = unwrap<Function>(fn_ref); |
| 1009 | const AttributeList attr_set = func->getAttributes(); | |
| 1010 | const AttributeList new_attr_set = attr_set.addAttribute(func->getContext(), AttributeList::FunctionIndex, | |
| 1011 | Attribute::Cold); | |
| 1012 | func->setAttributes(new_attr_set); | |
| 996 | func->addFnAttr(Attribute::Cold); | |
| 1013 | 997 | } |
| 1014 | 998 | |
| 1015 | 999 | void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv) { |
| ... | ... | @@ -1102,12 +1086,9 @@ void ZigLLVMSetTailCall(LLVMValueRef Call) { |
| 1102 | 1086 | } |
| 1103 | 1087 | |
| 1104 | 1088 | void ZigLLVMSetCallSret(LLVMValueRef Call, LLVMTypeRef return_type) { |
| 1105 | const AttributeList attr_set = unwrap<CallInst>(Call)->getAttributes(); | |
| 1106 | AttrBuilder attr_builder; | |
| 1089 | CallInst *call_inst = unwrap<CallInst>(Call); | |
| 1107 | 1090 | Type *llvm_type = unwrap<Type>(return_type); |
| 1108 | attr_builder.addStructRetAttr(llvm_type); | |
| 1109 | const AttributeList new_attr_set = attr_set.addAttributes(unwrap<CallInst>(Call)->getContext(), 1, attr_builder); | |
| 1110 | unwrap<CallInst>(Call)->setAttributes(new_attr_set); | |
| 1091 | call_inst->addParamAttr(1, Attribute::getWithStructRetType(call_inst->getContext(), llvm_type)); | |
| 1111 | 1092 | } |
| 1112 | 1093 | |
| 1113 | 1094 | void ZigLLVMFunctionSetPrefixData(LLVMValueRef function, LLVMValueRef data) { |
| ... | ... | @@ -1252,19 +1233,19 @@ bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size |
| 1252 | 1233 | return false; |
| 1253 | 1234 | } |
| 1254 | 1235 | |
| 1255 | int ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early) { | |
| 1236 | int ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early, bool disable_output) { | |
| 1256 | 1237 | std::vector<const char *> args(argv, argv + argc); |
| 1257 | return lld::coff::link(args, can_exit_early, llvm::outs(), llvm::errs()); | |
| 1238 | return lld::coff::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); | |
| 1258 | 1239 | } |
| 1259 | 1240 | |
| 1260 | int ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early) { | |
| 1241 | int ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early, bool disable_output) { | |
| 1261 | 1242 | std::vector<const char *> args(argv, argv + argc); |
| 1262 | return lld::elf::link(args, can_exit_early, llvm::outs(), llvm::errs()); | |
| 1243 | return lld::elf::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); | |
| 1263 | 1244 | } |
| 1264 | 1245 | |
| 1265 | int ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early) { | |
| 1246 | int ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early, bool disable_output) { | |
| 1266 | 1247 | std::vector<const char *> args(argv, argv + argc); |
| 1267 | return lld::wasm::link(args, can_exit_early, llvm::outs(), llvm::errs()); | |
| 1248 | return lld::wasm::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); | |
| 1268 | 1249 | } |
| 1269 | 1250 | |
| 1270 | 1251 | inline LLVMAttributeRef wrap(Attribute Attr) { |
| ... | ... | @@ -1370,6 +1351,8 @@ static_assert((Triple::ArchType)ZigLLVM_hsail == Triple::hsail, ""); |
| 1370 | 1351 | static_assert((Triple::ArchType)ZigLLVM_hsail64 == Triple::hsail64, ""); |
| 1371 | 1352 | static_assert((Triple::ArchType)ZigLLVM_spir == Triple::spir, ""); |
| 1372 | 1353 | static_assert((Triple::ArchType)ZigLLVM_spir64 == Triple::spir64, ""); |
| 1354 | static_assert((Triple::ArchType)ZigLLVM_spirv32 == Triple::spirv32, ""); | |
| 1355 | static_assert((Triple::ArchType)ZigLLVM_spirv64 == Triple::spirv64, ""); | |
| 1373 | 1356 | static_assert((Triple::ArchType)ZigLLVM_kalimba == Triple::kalimba, ""); |
| 1374 | 1357 | static_assert((Triple::ArchType)ZigLLVM_shave == Triple::shave, ""); |
| 1375 | 1358 | static_assert((Triple::ArchType)ZigLLVM_lanai == Triple::lanai, ""); |
src/zig_llvm.h+5-3| ... | ... | @@ -346,6 +346,8 @@ enum ZigLLVM_ArchType { |
| 346 | 346 | ZigLLVM_hsail64, // AMD HSAIL with 64-bit pointers |
| 347 | 347 | ZigLLVM_spir, // SPIR: standard portable IR for OpenCL 32-bit version |
| 348 | 348 | ZigLLVM_spir64, // SPIR: standard portable IR for OpenCL 64-bit version |
| 349 | ZigLLVM_spirv32, // SPIR-V with 32-bit pointers | |
| 350 | ZigLLVM_spirv64, // SPIR-V with 64-bit pointers | |
| 349 | 351 | ZigLLVM_kalimba, // Kalimba: generic kalimba |
| 350 | 352 | ZigLLVM_shave, // SHAVE: Movidius vector VLIW processors |
| 351 | 353 | ZigLLVM_lanai, // Lanai: Lanai 32-bit |
| ... | ... | @@ -512,9 +514,9 @@ ZIG_EXTERN_C const char *ZigLLVMGetVendorTypeName(enum ZigLLVM_VendorType vendor |
| 512 | 514 | ZIG_EXTERN_C const char *ZigLLVMGetOSTypeName(enum ZigLLVM_OSType os); |
| 513 | 515 | ZIG_EXTERN_C const char *ZigLLVMGetEnvironmentTypeName(enum ZigLLVM_EnvironmentType abi); |
| 514 | 516 | |
| 515 | ZIG_EXTERN_C int ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early); | |
| 516 | ZIG_EXTERN_C int ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early); | |
| 517 | ZIG_EXTERN_C int ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early); | |
| 517 | ZIG_EXTERN_C int ZigLLDLinkCOFF(int argc, const char **argv, bool can_exit_early, bool disable_output); | |
| 518 | ZIG_EXTERN_C int ZigLLDLinkELF(int argc, const char **argv, bool can_exit_early, bool disable_output); | |
| 519 | ZIG_EXTERN_C int ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early, bool disable_output); | |
| 518 | 520 | |
| 519 | 521 | ZIG_EXTERN_C bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count, |
| 520 | 522 | enum ZigLLVM_OSType os_type); |