| ... | @@ -50,6 +50,7 @@ | ... | @@ -50,6 +50,7 @@ |
| 50 | #include <llvm/Support/Timer.h> | 50 | #include <llvm/Support/Timer.h> |
| 51 | #include <llvm/Support/raw_ostream.h> | 51 | #include <llvm/Support/raw_ostream.h> |
| 52 | #include <llvm/Target/TargetMachine.h> | 52 | #include <llvm/Target/TargetMachine.h> |
| | 53 | #include <llvm/Target/TargetOptions.h> |
| 53 | #include <llvm/Target/CodeGenCWrappers.h> | 54 | #include <llvm/Target/CodeGenCWrappers.h> |
| 54 | #include <llvm/Transforms/IPO.h> | 55 | #include <llvm/Transforms/IPO.h> |
| 55 | #include <llvm/Transforms/IPO/AlwaysInliner.h> | 56 | #include <llvm/Transforms/IPO/AlwaysInliner.h> |
| ... | @@ -81,7 +82,7 @@ static const bool assertions_on = false; | ... | @@ -81,7 +82,7 @@ static const bool assertions_on = false; |
| 81 | | 82 | |
| 82 | LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Triple, | 83 | LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Triple, |
| 83 | const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, | 84 | const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, |
| 84 | LLVMCodeModel CodeModel, bool function_sections, bool data_sections, ZigLLVMABIType float_abi, | 85 | LLVMCodeModel CodeModel, bool function_sections, bool data_sections, ZigLLVMFloatABI float_abi, |
| 85 | const char *abi_name) | 86 | const char *abi_name) |
| 86 | { | 87 | { |
| 87 | std::optional<Reloc::Model> RM; | 88 | std::optional<Reloc::Model> RM; |
| ... | @@ -133,13 +134,13 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri | ... | @@ -133,13 +134,13 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri |
| 133 | opt.FunctionSections = function_sections; | 134 | opt.FunctionSections = function_sections; |
| 134 | opt.DataSections = data_sections; | 135 | opt.DataSections = data_sections; |
| 135 | switch (float_abi) { | 136 | switch (float_abi) { |
| 136 | case ZigLLVMABITypeDefault: | 137 | case ZigLLVMFloatABI_Default: |
| 137 | opt.FloatABIType = FloatABI::Default; | 138 | opt.FloatABIType = FloatABI::Default; |
| 138 | break; | 139 | break; |
| 139 | case ZigLLVMABITypeSoft: | 140 | case ZigLLVMFloatABI_Soft: |
| 140 | opt.FloatABIType = FloatABI::Soft; | 141 | opt.FloatABIType = FloatABI::Soft; |
| 141 | break; | 142 | break; |
| 142 | case ZigLLVMABITypeHard: | 143 | case ZigLLVMFloatABI_Hard: |
| 143 | opt.FloatABIType = FloatABI::Hard; | 144 | opt.FloatABIType = FloatABI::Hard; |
| 144 | break; | 145 | break; |
| 145 | } | 146 | } |
| ... | @@ -213,7 +214,7 @@ static SanitizerCoverageOptions getSanCovOptions(ZigLLVMCoverageOptions z) { | ... | @@ -213,7 +214,7 @@ static SanitizerCoverageOptions getSanCovOptions(ZigLLVMCoverageOptions z) { |
| 213 | } | 214 | } |
| 214 | | 215 | |
| 215 | ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref, | 216 | ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref, |
| 216 | char **error_message, const struct ZigLLVMEmitOptions *options) | 217 | char **error_message, const ZigLLVMEmitOptions *options) |
| 217 | { | 218 | { |
| 218 | TimePassesIsEnabled = options->time_report; | 219 | TimePassesIsEnabled = options->time_report; |
| 219 | | 220 | |
| ... | @@ -419,7 +420,7 @@ struct ZigDiagnosticHandler : public DiagnosticHandler { | ... | @@ -419,7 +420,7 @@ struct ZigDiagnosticHandler : public DiagnosticHandler { |
| 419 | BrokenDebugInfo = true; | 420 | BrokenDebugInfo = true; |
| 420 | } | 421 | } |
| 421 | return false; | 422 | return false; |
| 422 | } | 423 | } |
| 423 | }; | 424 | }; |
| 424 | | 425 | |
| 425 | void ZigLLVMEnableBrokenDebugInfoCheck(LLVMContextRef context_ref) { | 426 | void ZigLLVMEnableBrokenDebugInfoCheck(LLVMContextRef context_ref) { |
| ... | @@ -435,35 +436,10 @@ void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv) { | ... | @@ -435,35 +436,10 @@ void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv) { |
| 435 | cl::ParseCommandLineOptions(argc, argv); | 436 | cl::ParseCommandLineOptions(argc, argv); |
| 436 | } | 437 | } |
| 437 | | 438 | |
| 438 | bool ZigLLVMWriteImportLibrary(const char *def_path, const ZigLLVM_ArchType arch, | 439 | bool ZigLLVMWriteImportLibrary(const char *def_path, unsigned int coff_machine, |
| 439 | const char *output_lib_path, bool kill_at) | 440 | const char *output_lib_path, bool kill_at) |
| 440 | { | 441 | { |
| 441 | COFF::MachineTypes machine = COFF::IMAGE_FILE_MACHINE_UNKNOWN; | 442 | COFF::MachineTypes machine = static_cast<COFF::MachineTypes>(coff_machine); |
| 442 | | | |
| 443 | switch (arch) { | | |
| 444 | case ZigLLVM_x86: | | |
| 445 | machine = COFF::IMAGE_FILE_MACHINE_I386; | | |
| 446 | break; | | |
| 447 | case ZigLLVM_x86_64: | | |
| 448 | machine = COFF::IMAGE_FILE_MACHINE_AMD64; | | |
| 449 | break; | | |
| 450 | case ZigLLVM_arm: | | |
| 451 | case ZigLLVM_armeb: | | |
| 452 | case ZigLLVM_thumb: | | |
| 453 | case ZigLLVM_thumbeb: | | |
| 454 | machine = COFF::IMAGE_FILE_MACHINE_ARMNT; | | |
| 455 | break; | | |
| 456 | case ZigLLVM_aarch64: | | |
| 457 | case ZigLLVM_aarch64_be: | | |
| 458 | machine = COFF::IMAGE_FILE_MACHINE_ARM64; | | |
| 459 | break; | | |
| 460 | default: | | |
| 461 | break; | | |
| 462 | } | | |
| 463 | | | |
| 464 | if (machine == COFF::IMAGE_FILE_MACHINE_UNKNOWN) { | | |
| 465 | return true; | | |
| 466 | } | | |
| 467 | | 443 | |
| 468 | auto bufOrErr = MemoryBuffer::getFile(def_path); | 444 | auto bufOrErr = MemoryBuffer::getFile(def_path); |
| 469 | if (!bufOrErr) { | 445 | if (!bufOrErr) { |
| ... | @@ -515,30 +491,8 @@ bool ZigLLVMWriteImportLibrary(const char *def_path, const ZigLLVM_ArchType arch | ... | @@ -515,30 +491,8 @@ bool ZigLLVMWriteImportLibrary(const char *def_path, const ZigLLVM_ArchType arch |
| 515 | } | 491 | } |
| 516 | | 492 | |
| 517 | bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count, | 493 | bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count, |
| 518 | ZigLLVM_OSType os_type) | 494 | ZigLLVMArchiveKind archive_kind) |
| 519 | { | 495 | { |
| 520 | object::Archive::Kind kind; | | |
| 521 | switch (os_type) { | | |
| 522 | case ZigLLVM_Win32: | | |
| 523 | // For some reason llvm-lib passes K_GNU on windows. | | |
| 524 | // See lib/ToolDrivers/llvm-lib/LibDriver.cpp:168 in libDriverMain | | |
| 525 | kind = object::Archive::K_GNU; | | |
| 526 | break; | | |
| 527 | case ZigLLVM_Linux: | | |
| 528 | kind = object::Archive::K_GNU; | | |
| 529 | break; | | |
| 530 | case ZigLLVM_MacOSX: | | |
| 531 | case ZigLLVM_Darwin: | | |
| 532 | case ZigLLVM_IOS: | | |
| 533 | kind = object::Archive::K_DARWIN; | | |
| 534 | break; | | |
| 535 | case ZigLLVM_OpenBSD: | | |
| 536 | case ZigLLVM_FreeBSD: | | |
| 537 | kind = object::Archive::K_BSD; | | |
| 538 | break; | | |
| 539 | default: | | |
| 540 | kind = object::Archive::K_GNU; | | |
| 541 | } | | |
| 542 | SmallVector<NewArchiveMember, 4> new_members; | 496 | SmallVector<NewArchiveMember, 4> new_members; |
| 543 | for (size_t i = 0; i < file_name_count; i += 1) { | 497 | for (size_t i = 0; i < file_name_count; i += 1) { |
| 544 | Expected<NewArchiveMember> new_member = NewArchiveMember::getFile(file_names[i], true); | 498 | Expected<NewArchiveMember> new_member = NewArchiveMember::getFile(file_names[i], true); |
| ... | @@ -547,7 +501,7 @@ bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size | ... | @@ -547,7 +501,7 @@ bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size |
| 547 | new_members.push_back(std::move(*new_member)); | 501 | new_members.push_back(std::move(*new_member)); |
| 548 | } | 502 | } |
| 549 | Error err = writeArchive(archive_name, new_members, | 503 | Error err = writeArchive(archive_name, new_members, |
| 550 | SymtabWritingMode::NormalSymtab, kind, true, false, nullptr); | 504 | SymtabWritingMode::NormalSymtab, static_cast<object::Archive::Kind>(archive_kind), true, false, nullptr); |
| 551 | | 505 | |
| 552 | if (err) return true; | 506 | if (err) return true; |
| 553 | return false; | 507 | return false; |
| ... | @@ -586,236 +540,14 @@ bool ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early, bool disab | ... | @@ -586,236 +540,14 @@ bool ZigLLDLinkWasm(int argc, const char **argv, bool can_exit_early, bool disab |
| 586 | return lld::wasm::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); | 540 | return lld::wasm::link(args, llvm::outs(), llvm::errs(), can_exit_early, disable_output); |
| 587 | } | 541 | } |
| 588 | | 542 | |
| 589 | static_assert((Triple::ArchType)ZigLLVM_UnknownArch == Triple::UnknownArch, ""); | 543 | static_assert((FloatABI::ABIType)ZigLLVMFloatABI_Default == FloatABI::ABIType::Default, ""); |
| 590 | static_assert((Triple::ArchType)ZigLLVM_arm == Triple::arm, ""); | 544 | static_assert((FloatABI::ABIType)ZigLLVMFloatABI_Soft == FloatABI::ABIType::Soft, ""); |
| 591 | static_assert((Triple::ArchType)ZigLLVM_armeb == Triple::armeb, ""); | 545 | static_assert((FloatABI::ABIType)ZigLLVMFloatABI_Hard == FloatABI::ABIType::Hard, ""); |
| 592 | static_assert((Triple::ArchType)ZigLLVM_aarch64 == Triple::aarch64, ""); | 546 | |
| 593 | static_assert((Triple::ArchType)ZigLLVM_aarch64_be == Triple::aarch64_be, ""); | 547 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_GNU == object::Archive::Kind::K_GNU, ""); |
| 594 | static_assert((Triple::ArchType)ZigLLVM_aarch64_32 == Triple::aarch64_32, ""); | 548 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_GNU64 == object::Archive::Kind::K_GNU64, ""); |
| 595 | static_assert((Triple::ArchType)ZigLLVM_arc == Triple::arc, ""); | 549 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_BSD == object::Archive::Kind::K_BSD, ""); |
| 596 | static_assert((Triple::ArchType)ZigLLVM_avr == Triple::avr, ""); | 550 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_DARWIN == object::Archive::Kind::K_DARWIN, ""); |
| 597 | static_assert((Triple::ArchType)ZigLLVM_bpfel == Triple::bpfel, ""); | 551 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_DARWIN64 == object::Archive::Kind::K_DARWIN64, ""); |
| 598 | static_assert((Triple::ArchType)ZigLLVM_bpfeb == Triple::bpfeb, ""); | 552 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_COFF == object::Archive::Kind::K_COFF, ""); |
| 599 | static_assert((Triple::ArchType)ZigLLVM_csky == Triple::csky, ""); | 553 | static_assert((object::Archive::Kind)ZigLLVMArchiveKind_AIXBIG == object::Archive::Kind::K_AIXBIG, ""); |
| 600 | static_assert((Triple::ArchType)ZigLLVM_hexagon == Triple::hexagon, ""); | | |
| 601 | static_assert((Triple::ArchType)ZigLLVM_m68k == Triple::m68k, ""); | | |
| 602 | static_assert((Triple::ArchType)ZigLLVM_mips == Triple::mips, ""); | | |
| 603 | static_assert((Triple::ArchType)ZigLLVM_mipsel == Triple::mipsel, ""); | | |
| 604 | static_assert((Triple::ArchType)ZigLLVM_mips64 == Triple::mips64, ""); | | |
| 605 | static_assert((Triple::ArchType)ZigLLVM_mips64el == Triple::mips64el, ""); | | |
| 606 | static_assert((Triple::ArchType)ZigLLVM_msp430 == Triple::msp430, ""); | | |
| 607 | static_assert((Triple::ArchType)ZigLLVM_ppc == Triple::ppc, ""); | | |
| 608 | static_assert((Triple::ArchType)ZigLLVM_ppcle == Triple::ppcle, ""); | | |
| 609 | static_assert((Triple::ArchType)ZigLLVM_ppc64 == Triple::ppc64, ""); | | |
| 610 | static_assert((Triple::ArchType)ZigLLVM_ppc64le == Triple::ppc64le, ""); | | |
| 611 | static_assert((Triple::ArchType)ZigLLVM_r600 == Triple::r600, ""); | | |
| 612 | static_assert((Triple::ArchType)ZigLLVM_amdgcn == Triple::amdgcn, ""); | | |
| 613 | static_assert((Triple::ArchType)ZigLLVM_riscv32 == Triple::riscv32, ""); | | |
| 614 | static_assert((Triple::ArchType)ZigLLVM_riscv64 == Triple::riscv64, ""); | | |
| 615 | static_assert((Triple::ArchType)ZigLLVM_sparc == Triple::sparc, ""); | | |
| 616 | static_assert((Triple::ArchType)ZigLLVM_sparcv9 == Triple::sparcv9, ""); | | |
| 617 | static_assert((Triple::ArchType)ZigLLVM_sparcel == Triple::sparcel, ""); | | |
| 618 | static_assert((Triple::ArchType)ZigLLVM_systemz == Triple::systemz, ""); | | |
| 619 | static_assert((Triple::ArchType)ZigLLVM_tce == Triple::tce, ""); | | |
| 620 | static_assert((Triple::ArchType)ZigLLVM_tcele == Triple::tcele, ""); | | |
| 621 | static_assert((Triple::ArchType)ZigLLVM_thumb == Triple::thumb, ""); | | |
| 622 | static_assert((Triple::ArchType)ZigLLVM_thumbeb == Triple::thumbeb, ""); | | |
| 623 | static_assert((Triple::ArchType)ZigLLVM_x86 == Triple::x86, ""); | | |
| 624 | static_assert((Triple::ArchType)ZigLLVM_x86_64 == Triple::x86_64, ""); | | |
| 625 | static_assert((Triple::ArchType)ZigLLVM_xcore == Triple::xcore, ""); | | |
| 626 | static_assert((Triple::ArchType)ZigLLVM_xtensa == Triple::xtensa, ""); | | |
| 627 | static_assert((Triple::ArchType)ZigLLVM_nvptx == Triple::nvptx, ""); | | |
| 628 | static_assert((Triple::ArchType)ZigLLVM_nvptx64 == Triple::nvptx64, ""); | | |
| 629 | static_assert((Triple::ArchType)ZigLLVM_le32 == Triple::le32, ""); | | |
| 630 | static_assert((Triple::ArchType)ZigLLVM_le64 == Triple::le64, ""); | | |
| 631 | static_assert((Triple::ArchType)ZigLLVM_amdil == Triple::amdil, ""); | | |
| 632 | static_assert((Triple::ArchType)ZigLLVM_amdil64 == Triple::amdil64, ""); | | |
| 633 | static_assert((Triple::ArchType)ZigLLVM_hsail == Triple::hsail, ""); | | |
| 634 | static_assert((Triple::ArchType)ZigLLVM_hsail64 == Triple::hsail64, ""); | | |
| 635 | static_assert((Triple::ArchType)ZigLLVM_spir == Triple::spir, ""); | | |
| 636 | static_assert((Triple::ArchType)ZigLLVM_spir64 == Triple::spir64, ""); | | |
| 637 | static_assert((Triple::ArchType)ZigLLVM_spirv == Triple::spirv, ""); | | |
| 638 | static_assert((Triple::ArchType)ZigLLVM_spirv32 == Triple::spirv32, ""); | | |
| 639 | static_assert((Triple::ArchType)ZigLLVM_spirv64 == Triple::spirv64, ""); | | |
| 640 | static_assert((Triple::ArchType)ZigLLVM_kalimba == Triple::kalimba, ""); | | |
| 641 | static_assert((Triple::ArchType)ZigLLVM_shave == Triple::shave, ""); | | |
| 642 | static_assert((Triple::ArchType)ZigLLVM_lanai == Triple::lanai, ""); | | |
| 643 | static_assert((Triple::ArchType)ZigLLVM_wasm32 == Triple::wasm32, ""); | | |
| 644 | static_assert((Triple::ArchType)ZigLLVM_wasm64 == Triple::wasm64, ""); | | |
| 645 | static_assert((Triple::ArchType)ZigLLVM_renderscript32 == Triple::renderscript32, ""); | | |
| 646 | static_assert((Triple::ArchType)ZigLLVM_renderscript64 == Triple::renderscript64, ""); | | |
| 647 | static_assert((Triple::ArchType)ZigLLVM_ve == Triple::ve, ""); | | |
| 648 | static_assert((Triple::ArchType)ZigLLVM_LastArchType == Triple::LastArchType, ""); | | |
| 649 | | | |
| 650 | static_assert((Triple::VendorType)ZigLLVM_UnknownVendor == Triple::UnknownVendor, ""); | | |
| 651 | static_assert((Triple::VendorType)ZigLLVM_Apple == Triple::Apple, ""); | | |
| 652 | static_assert((Triple::VendorType)ZigLLVM_PC == Triple::PC, ""); | | |
| 653 | static_assert((Triple::VendorType)ZigLLVM_SCEI == Triple::SCEI, ""); | | |
| 654 | static_assert((Triple::VendorType)ZigLLVM_Freescale == Triple::Freescale, ""); | | |
| 655 | static_assert((Triple::VendorType)ZigLLVM_IBM == Triple::IBM, ""); | | |
| 656 | static_assert((Triple::VendorType)ZigLLVM_ImaginationTechnologies == Triple::ImaginationTechnologies, ""); | | |
| 657 | static_assert((Triple::VendorType)ZigLLVM_MipsTechnologies == Triple::MipsTechnologies, ""); | | |
| 658 | static_assert((Triple::VendorType)ZigLLVM_NVIDIA == Triple::NVIDIA, ""); | | |
| 659 | static_assert((Triple::VendorType)ZigLLVM_CSR == Triple::CSR, ""); | | |
| 660 | static_assert((Triple::VendorType)ZigLLVM_AMD == Triple::AMD, ""); | | |
| 661 | static_assert((Triple::VendorType)ZigLLVM_Mesa == Triple::Mesa, ""); | | |
| 662 | static_assert((Triple::VendorType)ZigLLVM_SUSE == Triple::SUSE, ""); | | |
| 663 | static_assert((Triple::VendorType)ZigLLVM_OpenEmbedded == Triple::OpenEmbedded, ""); | | |
| 664 | static_assert((Triple::VendorType)ZigLLVM_LastVendorType == Triple::LastVendorType, ""); | | |
| 665 | | | |
| 666 | static_assert((Triple::OSType)ZigLLVM_UnknownOS == Triple::UnknownOS, ""); | | |
| 667 | static_assert((Triple::OSType)ZigLLVM_Darwin == Triple::Darwin, ""); | | |
| 668 | static_assert((Triple::OSType)ZigLLVM_DragonFly == Triple::DragonFly, ""); | | |
| 669 | static_assert((Triple::OSType)ZigLLVM_FreeBSD == Triple::FreeBSD, ""); | | |
| 670 | static_assert((Triple::OSType)ZigLLVM_Fuchsia == Triple::Fuchsia, ""); | | |
| 671 | static_assert((Triple::OSType)ZigLLVM_IOS == Triple::IOS, ""); | | |
| 672 | // Commented out to work around a Debian/Ubuntu bug. | | |
| 673 | // See https://github.com/ziglang/zig/issues/2076 | | |
| 674 | //static_assert((Triple::OSType)ZigLLVM_KFreeBSD == Triple::KFreeBSD, ""); | | |
| 675 | static_assert((Triple::OSType)ZigLLVM_Linux == Triple::Linux, ""); | | |
| 676 | static_assert((Triple::OSType)ZigLLVM_Lv2 == Triple::Lv2, ""); | | |
| 677 | static_assert((Triple::OSType)ZigLLVM_MacOSX == Triple::MacOSX, ""); | | |
| 678 | static_assert((Triple::OSType)ZigLLVM_NetBSD == Triple::NetBSD, ""); | | |
| 679 | static_assert((Triple::OSType)ZigLLVM_OpenBSD == Triple::OpenBSD, ""); | | |
| 680 | static_assert((Triple::OSType)ZigLLVM_Solaris == Triple::Solaris, ""); | | |
| 681 | static_assert((Triple::OSType)ZigLLVM_UEFI == Triple::UEFI, ""); | | |
| 682 | static_assert((Triple::OSType)ZigLLVM_Win32 == Triple::Win32, ""); | | |
| 683 | static_assert((Triple::OSType)ZigLLVM_ZOS == Triple::ZOS, ""); | | |
| 684 | static_assert((Triple::OSType)ZigLLVM_Haiku == Triple::Haiku, ""); | | |
| 685 | static_assert((Triple::OSType)ZigLLVM_RTEMS == Triple::RTEMS, ""); | | |
| 686 | static_assert((Triple::OSType)ZigLLVM_NaCl == Triple::NaCl, ""); | | |
| 687 | static_assert((Triple::OSType)ZigLLVM_AIX == Triple::AIX, ""); | | |
| 688 | static_assert((Triple::OSType)ZigLLVM_CUDA == Triple::CUDA, ""); | | |
| 689 | static_assert((Triple::OSType)ZigLLVM_NVCL == Triple::NVCL, ""); | | |
| 690 | static_assert((Triple::OSType)ZigLLVM_AMDHSA == Triple::AMDHSA, ""); | | |
| 691 | static_assert((Triple::OSType)ZigLLVM_PS4 == Triple::PS4, ""); | | |
| 692 | static_assert((Triple::OSType)ZigLLVM_ELFIAMCU == Triple::ELFIAMCU, ""); | | |
| 693 | static_assert((Triple::OSType)ZigLLVM_TvOS == Triple::TvOS, ""); | | |
| 694 | static_assert((Triple::OSType)ZigLLVM_WatchOS == Triple::WatchOS, ""); | | |
| 695 | static_assert((Triple::OSType)ZigLLVM_BridgeOS == Triple::BridgeOS, ""); | | |
| 696 | static_assert((Triple::OSType)ZigLLVM_DriverKit == Triple::DriverKit, ""); | | |
| 697 | static_assert((Triple::OSType)ZigLLVM_XROS == Triple::XROS, ""); | | |
| 698 | static_assert((Triple::OSType)ZigLLVM_Mesa3D == Triple::Mesa3D, ""); | | |
| 699 | static_assert((Triple::OSType)ZigLLVM_AMDPAL == Triple::AMDPAL, ""); | | |
| 700 | static_assert((Triple::OSType)ZigLLVM_HermitCore == Triple::HermitCore, ""); | | |
| 701 | static_assert((Triple::OSType)ZigLLVM_Hurd == Triple::Hurd, ""); | | |
| 702 | static_assert((Triple::OSType)ZigLLVM_WASI == Triple::WASI, ""); | | |
| 703 | static_assert((Triple::OSType)ZigLLVM_Emscripten == Triple::Emscripten, ""); | | |
| 704 | static_assert((Triple::OSType)ZigLLVM_ShaderModel == Triple::ShaderModel, ""); | | |
| 705 | static_assert((Triple::OSType)ZigLLVM_LiteOS == Triple::LiteOS, ""); | | |
| 706 | static_assert((Triple::OSType)ZigLLVM_Serenity == Triple::Serenity, ""); | | |
| 707 | static_assert((Triple::OSType)ZigLLVM_Vulkan == Triple::Vulkan, ""); | | |
| 708 | static_assert((Triple::OSType)ZigLLVM_LastOSType == Triple::LastOSType, ""); | | |
| 709 | | | |
| 710 | static_assert((Triple::EnvironmentType)ZigLLVM_UnknownEnvironment == Triple::UnknownEnvironment, ""); | | |
| 711 | static_assert((Triple::EnvironmentType)ZigLLVM_GNU == Triple::GNU, ""); | | |
| 712 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUABIN32 == Triple::GNUABIN32, ""); | | |
| 713 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUABI64 == Triple::GNUABI64, ""); | | |
| 714 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUEABI == Triple::GNUEABI, ""); | | |
| 715 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUEABIHF == Triple::GNUEABIHF, ""); | | |
| 716 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUF32 == Triple::GNUF32, ""); | | |
| 717 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUF64 == Triple::GNUF64, ""); | | |
| 718 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUSF == Triple::GNUSF, ""); | | |
| 719 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUX32 == Triple::GNUX32, ""); | | |
| 720 | static_assert((Triple::EnvironmentType)ZigLLVM_GNUILP32 == Triple::GNUILP32, ""); | | |
| 721 | static_assert((Triple::EnvironmentType)ZigLLVM_CODE16 == Triple::CODE16, ""); | | |
| 722 | static_assert((Triple::EnvironmentType)ZigLLVM_EABI == Triple::EABI, ""); | | |
| 723 | static_assert((Triple::EnvironmentType)ZigLLVM_EABIHF == Triple::EABIHF, ""); | | |
| 724 | static_assert((Triple::EnvironmentType)ZigLLVM_Android == Triple::Android, ""); | | |
| 725 | static_assert((Triple::EnvironmentType)ZigLLVM_Musl == Triple::Musl, ""); | | |
| 726 | static_assert((Triple::EnvironmentType)ZigLLVM_MuslEABI == Triple::MuslEABI, ""); | | |
| 727 | static_assert((Triple::EnvironmentType)ZigLLVM_MuslEABIHF == Triple::MuslEABIHF, ""); | | |
| 728 | static_assert((Triple::EnvironmentType)ZigLLVM_MuslX32 == Triple::MuslX32, ""); | | |
| 729 | static_assert((Triple::EnvironmentType)ZigLLVM_MSVC == Triple::MSVC, ""); | | |
| 730 | static_assert((Triple::EnvironmentType)ZigLLVM_Itanium == Triple::Itanium, ""); | | |
| 731 | static_assert((Triple::EnvironmentType)ZigLLVM_Cygnus == Triple::Cygnus, ""); | | |
| 732 | static_assert((Triple::EnvironmentType)ZigLLVM_CoreCLR == Triple::CoreCLR, ""); | | |
| 733 | static_assert((Triple::EnvironmentType)ZigLLVM_Simulator == Triple::Simulator, ""); | | |
| 734 | static_assert((Triple::EnvironmentType)ZigLLVM_MacABI == Triple::MacABI, ""); | | |
| 735 | static_assert((Triple::EnvironmentType)ZigLLVM_Pixel == Triple::Pixel, ""); | | |
| 736 | static_assert((Triple::EnvironmentType)ZigLLVM_Vertex == Triple::Vertex, ""); | | |
| 737 | static_assert((Triple::EnvironmentType)ZigLLVM_Geometry == Triple::Geometry, ""); | | |
| 738 | static_assert((Triple::EnvironmentType)ZigLLVM_Hull == Triple::Hull, ""); | | |
| 739 | static_assert((Triple::EnvironmentType)ZigLLVM_Domain == Triple::Domain, ""); | | |
| 740 | static_assert((Triple::EnvironmentType)ZigLLVM_Compute == Triple::Compute, ""); | | |
| 741 | static_assert((Triple::EnvironmentType)ZigLLVM_Library == Triple::Library, ""); | | |
| 742 | static_assert((Triple::EnvironmentType)ZigLLVM_RayGeneration == Triple::RayGeneration, ""); | | |
| 743 | static_assert((Triple::EnvironmentType)ZigLLVM_Intersection == Triple::Intersection, ""); | | |
| 744 | static_assert((Triple::EnvironmentType)ZigLLVM_AnyHit == Triple::AnyHit, ""); | | |
| 745 | static_assert((Triple::EnvironmentType)ZigLLVM_ClosestHit == Triple::ClosestHit, ""); | | |
| 746 | static_assert((Triple::EnvironmentType)ZigLLVM_Miss == Triple::Miss, ""); | | |
| 747 | static_assert((Triple::EnvironmentType)ZigLLVM_Callable == Triple::Callable, ""); | | |
| 748 | static_assert((Triple::EnvironmentType)ZigLLVM_Mesh == Triple::Mesh, ""); | | |
| 749 | static_assert((Triple::EnvironmentType)ZigLLVM_Amplification == Triple::Amplification, ""); | | |
| 750 | static_assert((Triple::EnvironmentType)ZigLLVM_OpenCL == Triple::OpenCL, ""); | | |
| 751 | static_assert((Triple::EnvironmentType)ZigLLVM_OpenHOS == Triple::OpenHOS, ""); | | |
| 752 | static_assert((Triple::EnvironmentType)ZigLLVM_PAuthTest == Triple::PAuthTest, ""); | | |
| 753 | static_assert((Triple::EnvironmentType)ZigLLVM_LastEnvironmentType == Triple::LastEnvironmentType, ""); | | |
| 754 | | | |
| 755 | static_assert((Triple::ObjectFormatType)ZigLLVM_UnknownObjectFormat == Triple::UnknownObjectFormat, ""); | | |
| 756 | static_assert((Triple::ObjectFormatType)ZigLLVM_COFF == Triple::COFF, ""); | | |
| 757 | static_assert((Triple::ObjectFormatType)ZigLLVM_ELF == Triple::ELF, ""); | | |
| 758 | static_assert((Triple::ObjectFormatType)ZigLLVM_GOFF == Triple::GOFF, ""); | | |
| 759 | static_assert((Triple::ObjectFormatType)ZigLLVM_MachO == Triple::MachO, ""); | | |
| 760 | static_assert((Triple::ObjectFormatType)ZigLLVM_Wasm == Triple::Wasm, ""); | | |
| 761 | static_assert((Triple::ObjectFormatType)ZigLLVM_XCOFF == Triple::XCOFF, ""); | | |
| 762 | | | |
| 763 | static_assert((CallingConv::ID)ZigLLVM_C == llvm::CallingConv::C, ""); | | |
| 764 | static_assert((CallingConv::ID)ZigLLVM_Fast == llvm::CallingConv::Fast, ""); | | |
| 765 | static_assert((CallingConv::ID)ZigLLVM_Cold == llvm::CallingConv::Cold, ""); | | |
| 766 | static_assert((CallingConv::ID)ZigLLVM_GHC == llvm::CallingConv::GHC, ""); | | |
| 767 | static_assert((CallingConv::ID)ZigLLVM_HiPE == llvm::CallingConv::HiPE, ""); | | |
| 768 | static_assert((CallingConv::ID)ZigLLVM_AnyReg == llvm::CallingConv::AnyReg, ""); | | |
| 769 | static_assert((CallingConv::ID)ZigLLVM_PreserveMost == llvm::CallingConv::PreserveMost, ""); | | |
| 770 | static_assert((CallingConv::ID)ZigLLVM_PreserveAll == llvm::CallingConv::PreserveAll, ""); | | |
| 771 | static_assert((CallingConv::ID)ZigLLVM_Swift == llvm::CallingConv::Swift, ""); | | |
| 772 | static_assert((CallingConv::ID)ZigLLVM_CXX_FAST_TLS == llvm::CallingConv::CXX_FAST_TLS, ""); | | |
| 773 | static_assert((CallingConv::ID)ZigLLVM_Tail == llvm::CallingConv::Tail, ""); | | |
| 774 | static_assert((CallingConv::ID)ZigLLVM_CFGuard_Check == llvm::CallingConv::CFGuard_Check, ""); | | |
| 775 | static_assert((CallingConv::ID)ZigLLVM_SwiftTail == llvm::CallingConv::SwiftTail, ""); | | |
| 776 | static_assert((CallingConv::ID)ZigLLVM_FirstTargetCC == llvm::CallingConv::FirstTargetCC, ""); | | |
| 777 | static_assert((CallingConv::ID)ZigLLVM_X86_StdCall == llvm::CallingConv::X86_StdCall, ""); | | |
| 778 | static_assert((CallingConv::ID)ZigLLVM_X86_FastCall == llvm::CallingConv::X86_FastCall, ""); | | |
| 779 | static_assert((CallingConv::ID)ZigLLVM_ARM_APCS == llvm::CallingConv::ARM_APCS, ""); | | |
| 780 | static_assert((CallingConv::ID)ZigLLVM_ARM_AAPCS == llvm::CallingConv::ARM_AAPCS, ""); | | |
| 781 | static_assert((CallingConv::ID)ZigLLVM_ARM_AAPCS_VFP == llvm::CallingConv::ARM_AAPCS_VFP, ""); | | |
| 782 | static_assert((CallingConv::ID)ZigLLVM_MSP430_INTR == llvm::CallingConv::MSP430_INTR, ""); | | |
| 783 | static_assert((CallingConv::ID)ZigLLVM_X86_ThisCall == llvm::CallingConv::X86_ThisCall, ""); | | |
| 784 | static_assert((CallingConv::ID)ZigLLVM_PTX_Kernel == llvm::CallingConv::PTX_Kernel, ""); | | |
| 785 | static_assert((CallingConv::ID)ZigLLVM_PTX_Device == llvm::CallingConv::PTX_Device, ""); | | |
| 786 | static_assert((CallingConv::ID)ZigLLVM_SPIR_FUNC == llvm::CallingConv::SPIR_FUNC, ""); | | |
| 787 | static_assert((CallingConv::ID)ZigLLVM_SPIR_KERNEL == llvm::CallingConv::SPIR_KERNEL, ""); | | |
| 788 | static_assert((CallingConv::ID)ZigLLVM_Intel_OCL_BI == llvm::CallingConv::Intel_OCL_BI, ""); | | |
| 789 | static_assert((CallingConv::ID)ZigLLVM_X86_64_SysV == llvm::CallingConv::X86_64_SysV, ""); | | |
| 790 | static_assert((CallingConv::ID)ZigLLVM_Win64 == llvm::CallingConv::Win64, ""); | | |
| 791 | static_assert((CallingConv::ID)ZigLLVM_X86_VectorCall == llvm::CallingConv::X86_VectorCall, ""); | | |
| 792 | static_assert((CallingConv::ID)ZigLLVM_DUMMY_HHVM == llvm::CallingConv::DUMMY_HHVM, ""); | | |
| 793 | static_assert((CallingConv::ID)ZigLLVM_DUMMY_HHVM_C == llvm::CallingConv::DUMMY_HHVM_C, ""); | | |
| 794 | static_assert((CallingConv::ID)ZigLLVM_X86_INTR == llvm::CallingConv::X86_INTR, ""); | | |
| 795 | static_assert((CallingConv::ID)ZigLLVM_AVR_INTR == llvm::CallingConv::AVR_INTR, ""); | | |
| 796 | static_assert((CallingConv::ID)ZigLLVM_AVR_SIGNAL == llvm::CallingConv::AVR_SIGNAL, ""); | | |
| 797 | static_assert((CallingConv::ID)ZigLLVM_AVR_BUILTIN == llvm::CallingConv::AVR_BUILTIN, ""); | | |
| 798 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_VS == llvm::CallingConv::AMDGPU_VS, ""); | | |
| 799 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_GS == llvm::CallingConv::AMDGPU_GS, ""); | | |
| 800 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_PS == llvm::CallingConv::AMDGPU_PS, ""); | | |
| 801 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_CS == llvm::CallingConv::AMDGPU_CS, ""); | | |
| 802 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_KERNEL == llvm::CallingConv::AMDGPU_KERNEL, ""); | | |
| 803 | static_assert((CallingConv::ID)ZigLLVM_X86_RegCall == llvm::CallingConv::X86_RegCall, ""); | | |
| 804 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_HS == llvm::CallingConv::AMDGPU_HS, ""); | | |
| 805 | static_assert((CallingConv::ID)ZigLLVM_MSP430_BUILTIN == llvm::CallingConv::MSP430_BUILTIN, ""); | | |
| 806 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_LS == llvm::CallingConv::AMDGPU_LS, ""); | | |
| 807 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_ES == llvm::CallingConv::AMDGPU_ES, ""); | | |
| 808 | static_assert((CallingConv::ID)ZigLLVM_AArch64_VectorCall == llvm::CallingConv::AArch64_VectorCall, ""); | | |
| 809 | static_assert((CallingConv::ID)ZigLLVM_AArch64_SVE_VectorCall == llvm::CallingConv::AArch64_SVE_VectorCall, ""); | | |
| 810 | static_assert((CallingConv::ID)ZigLLVM_WASM_EmscriptenInvoke == llvm::CallingConv::WASM_EmscriptenInvoke, ""); | | |
| 811 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_Gfx == llvm::CallingConv::AMDGPU_Gfx, ""); | | |
| 812 | static_assert((CallingConv::ID)ZigLLVM_M68k_INTR == llvm::CallingConv::M68k_INTR, ""); | | |
| 813 | static_assert((CallingConv::ID)ZigLLVM_AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0 == llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, ""); | | |
| 814 | static_assert((CallingConv::ID)ZigLLVM_AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2 == llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, ""); | | |
| 815 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_CS_Chain == llvm::CallingConv::AMDGPU_CS_Chain, ""); | | |
| 816 | static_assert((CallingConv::ID)ZigLLVM_AMDGPU_CS_ChainPreserve == llvm::CallingConv::AMDGPU_CS_ChainPreserve, ""); | | |
| 817 | static_assert((CallingConv::ID)ZigLLVM_M68k_RTD == llvm::CallingConv::M68k_RTD, ""); | | |
| 818 | static_assert((CallingConv::ID)ZigLLVM_GRAAL == llvm::CallingConv::GRAAL, ""); | | |
| 819 | static_assert((CallingConv::ID)ZigLLVM_ARM64EC_Thunk_X64 == llvm::CallingConv::ARM64EC_Thunk_X64, ""); | | |
| 820 | static_assert((CallingConv::ID)ZigLLVM_ARM64EC_Thunk_Native == llvm::CallingConv::ARM64EC_Thunk_Native, ""); | | |
| 821 | static_assert((CallingConv::ID)ZigLLVM_MaxID == llvm::CallingConv::MaxID, ""); | | |