| author | |
| committer | |
| log | 70d39123908e29cde9fbfb540869e03ab86694e3 |
| tree | 00461d726a66cc57de7173173c66823d51727ae6 |
| parent | d46446e4dfade96fe0db773ce4d8d1b7154cae92 |
15 files changed, 306 insertions(+), 56 deletions(-)
lib/std/target.zig+56-2| ... | ... | @@ -40,9 +40,11 @@ pub const Target = struct { |
| 40 | 40 | nvcl, |
| 41 | 41 | amdhsa, |
| 42 | 42 | ps4, |
| 43 | ps5, | |
| 43 | 44 | elfiamcu, |
| 44 | 45 | tvos, |
| 45 | 46 | watchos, |
| 47 | driverkit, | |
| 46 | 48 | mesa3d, |
| 47 | 49 | contiki, |
| 48 | 50 | amdpal, |
| ... | ... | @@ -50,6 +52,7 @@ pub const Target = struct { |
| 50 | 52 | hurd, |
| 51 | 53 | wasi, |
| 52 | 54 | emscripten, |
| 55 | shadermodel, | |
| 53 | 56 | uefi, |
| 54 | 57 | opencl, |
| 55 | 58 | glsl450, |
| ... | ... | @@ -244,6 +247,7 @@ pub const Target = struct { |
| 244 | 247 | .nvcl, |
| 245 | 248 | .amdhsa, |
| 246 | 249 | .ps4, |
| 250 | .ps5, | |
| 247 | 251 | .elfiamcu, |
| 248 | 252 | .mesa3d, |
| 249 | 253 | .contiki, |
| ... | ... | @@ -252,6 +256,8 @@ pub const Target = struct { |
| 252 | 256 | .hurd, |
| 253 | 257 | .wasi, |
| 254 | 258 | .emscripten, |
| 259 | .driverkit, | |
| 260 | .shadermodel, | |
| 255 | 261 | .uefi, |
| 256 | 262 | .opencl, // TODO: OpenCL versions |
| 257 | 263 | .glsl450, // TODO: GLSL versions |
| ... | ... | @@ -419,6 +425,7 @@ pub const Target = struct { |
| 419 | 425 | .nvcl, |
| 420 | 426 | .amdhsa, |
| 421 | 427 | .ps4, |
| 428 | .ps5, | |
| 422 | 429 | .elfiamcu, |
| 423 | 430 | .mesa3d, |
| 424 | 431 | .contiki, |
| ... | ... | @@ -427,6 +434,8 @@ pub const Target = struct { |
| 427 | 434 | .hurd, |
| 428 | 435 | .wasi, |
| 429 | 436 | .emscripten, |
| 437 | .driverkit, | |
| 438 | .shadermodel, | |
| 430 | 439 | .uefi, |
| 431 | 440 | .opencl, |
| 432 | 441 | .glsl450, |
| ... | ... | @@ -481,6 +490,21 @@ pub const Target = struct { |
| 481 | 490 | coreclr, |
| 482 | 491 | simulator, |
| 483 | 492 | macabi, |
| 493 | pixel, | |
| 494 | vertex, | |
| 495 | geometry, | |
| 496 | hull, | |
| 497 | domain, | |
| 498 | compute, | |
| 499 | library, | |
| 500 | raygeneration, | |
| 501 | intersection, | |
| 502 | anyhit, | |
| 503 | closesthit, | |
| 504 | miss, | |
| 505 | callable, | |
| 506 | mesh, | |
| 507 | amplification, | |
| 484 | 508 | |
| 485 | 509 | pub fn default(arch: Cpu.Arch, target_os: Os) Abi { |
| 486 | 510 | if (arch.isWasm()) { |
| ... | ... | @@ -502,6 +526,7 @@ pub const Target = struct { |
| 502 | 526 | .nvcl, |
| 503 | 527 | .amdhsa, |
| 504 | 528 | .ps4, |
| 529 | .ps5, | |
| 505 | 530 | .elfiamcu, |
| 506 | 531 | .mesa3d, |
| 507 | 532 | .contiki, |
| ... | ... | @@ -531,6 +556,8 @@ pub const Target = struct { |
| 531 | 556 | .ios, |
| 532 | 557 | .tvos, |
| 533 | 558 | .watchos, |
| 559 | .driverkit, | |
| 560 | .shadermodel, | |
| 534 | 561 | => return .none, |
| 535 | 562 | } |
| 536 | 563 | } |
| ... | ... | @@ -563,16 +590,18 @@ pub const Target = struct { |
| 563 | 590 | pub const ObjectFormat = enum { |
| 564 | 591 | /// Common Object File Format (Windows) |
| 565 | 592 | coff, |
| 593 | /// DirectX Container | |
| 594 | dxcontainer, | |
| 566 | 595 | /// Executable and Linking Format |
| 567 | 596 | elf, |
| 568 | 597 | /// macOS relocatables |
| 569 | 598 | macho, |
| 599 | /// Standard, Portable Intermediate Representation V | |
| 600 | spirv, | |
| 570 | 601 | /// WebAssembly |
| 571 | 602 | wasm, |
| 572 | 603 | /// C source code |
| 573 | 604 | c, |
| 574 | /// Standard, Portable Intermediate Representation V | |
| 575 | spirv, | |
| 576 | 605 | /// Intel IHEX |
| 577 | 606 | hex, |
| 578 | 607 | /// Machine code with no metadata. |
| ... | ... | @@ -592,6 +621,7 @@ pub const Target = struct { |
| 592 | 621 | .raw => ".bin", |
| 593 | 622 | .plan9 => plan9Ext(cpu_arch), |
| 594 | 623 | .nvptx => ".ptx", |
| 624 | .dxcontainer => @panic("TODO what's the extension for these?"), | |
| 595 | 625 | }; |
| 596 | 626 | } |
| 597 | 627 | }; |
| ... | ... | @@ -769,7 +799,10 @@ pub const Target = struct { |
| 769 | 799 | bpfel, |
| 770 | 800 | bpfeb, |
| 771 | 801 | csky, |
| 802 | dxil, | |
| 772 | 803 | hexagon, |
| 804 | loongarch32, | |
| 805 | loongarch64, | |
| 773 | 806 | m68k, |
| 774 | 807 | mips, |
| 775 | 808 | mipsel, |
| ... | ... | @@ -920,6 +953,7 @@ pub const Target = struct { |
| 920 | 953 | .arm => .ARM, |
| 921 | 954 | .armeb => .ARM, |
| 922 | 955 | .hexagon => .HEXAGON, |
| 956 | .dxil => .NONE, | |
| 923 | 957 | .m68k => .@"68K", |
| 924 | 958 | .le32 => .NONE, |
| 925 | 959 | .mips => .MIPS, |
| ... | ... | @@ -970,6 +1004,8 @@ pub const Target = struct { |
| 970 | 1004 | .spu_2 => .SPU_2, |
| 971 | 1005 | .spirv32 => .NONE, |
| 972 | 1006 | .spirv64 => .NONE, |
| 1007 | .loongarch32 => .NONE, | |
| 1008 | .loongarch64 => .NONE, | |
| 973 | 1009 | }; |
| 974 | 1010 | } |
| 975 | 1011 | |
| ... | ... | @@ -980,6 +1016,7 @@ pub const Target = struct { |
| 980 | 1016 | .arc => .Unknown, |
| 981 | 1017 | .arm => .ARM, |
| 982 | 1018 | .armeb => .Unknown, |
| 1019 | .dxil => .Unknown, | |
| 983 | 1020 | .hexagon => .Unknown, |
| 984 | 1021 | .m68k => .Unknown, |
| 985 | 1022 | .le32 => .Unknown, |
| ... | ... | @@ -1031,6 +1068,8 @@ pub const Target = struct { |
| 1031 | 1068 | .spu_2 => .Unknown, |
| 1032 | 1069 | .spirv32 => .Unknown, |
| 1033 | 1070 | .spirv64 => .Unknown, |
| 1071 | .loongarch32 => .Unknown, | |
| 1072 | .loongarch64 => .Unknown, | |
| 1034 | 1073 | }; |
| 1035 | 1074 | } |
| 1036 | 1075 | |
| ... | ... | @@ -1079,6 +1118,9 @@ pub const Target = struct { |
| 1079 | 1118 | // GPU bitness is opaque. For now, assume little endian. |
| 1080 | 1119 | .spirv32, |
| 1081 | 1120 | .spirv64, |
| 1121 | .dxil, | |
| 1122 | .loongarch32, | |
| 1123 | .loongarch64, | |
| 1082 | 1124 | => .Little, |
| 1083 | 1125 | |
| 1084 | 1126 | .arc, |
| ... | ... | @@ -1139,6 +1181,8 @@ pub const Target = struct { |
| 1139 | 1181 | .renderscript32, |
| 1140 | 1182 | .aarch64_32, |
| 1141 | 1183 | .spirv32, |
| 1184 | .loongarch32, | |
| 1185 | .dxil, | |
| 1142 | 1186 | => return 32, |
| 1143 | 1187 | |
| 1144 | 1188 | .aarch64, |
| ... | ... | @@ -1163,6 +1207,7 @@ pub const Target = struct { |
| 1163 | 1207 | .s390x, |
| 1164 | 1208 | .ve, |
| 1165 | 1209 | .spirv64, |
| 1210 | .loongarch64, | |
| 1166 | 1211 | => return 64, |
| 1167 | 1212 | } |
| 1168 | 1213 | } |
| ... | ... | @@ -1636,6 +1681,9 @@ pub const Target = struct { |
| 1636 | 1681 | .renderscript32, |
| 1637 | 1682 | .renderscript64, |
| 1638 | 1683 | .ve, |
| 1684 | .dxil, | |
| 1685 | .loongarch32, | |
| 1686 | .loongarch64, | |
| 1639 | 1687 | => return result, |
| 1640 | 1688 | }, |
| 1641 | 1689 | |
| ... | ... | @@ -1678,12 +1726,15 @@ pub const Target = struct { |
| 1678 | 1726 | .nvcl, |
| 1679 | 1727 | .amdhsa, |
| 1680 | 1728 | .ps4, |
| 1729 | .ps5, | |
| 1681 | 1730 | .elfiamcu, |
| 1682 | 1731 | .mesa3d, |
| 1683 | 1732 | .contiki, |
| 1684 | 1733 | .amdpal, |
| 1685 | 1734 | .hermit, |
| 1686 | 1735 | .hurd, |
| 1736 | .driverkit, | |
| 1737 | .shadermodel, | |
| 1687 | 1738 | => return result, |
| 1688 | 1739 | } |
| 1689 | 1740 | } |
| ... | ... | @@ -1852,6 +1903,9 @@ pub const Target = struct { |
| 1852 | 1903 | .renderscript64, |
| 1853 | 1904 | .ve, |
| 1854 | 1905 | .spirv64, |
| 1906 | .dxil, | |
| 1907 | .loongarch32, | |
| 1908 | .loongarch64, | |
| 1855 | 1909 | => 16, |
| 1856 | 1910 | }; |
| 1857 | 1911 | } |
lib/std/zig.zig+1| ... | ... | @@ -190,6 +190,7 @@ pub fn binNameAlloc(allocator: std.mem.Allocator, options: BinNameOptions) error |
| 190 | 190 | .Lib => return std.fmt.allocPrint(allocator, "{s}{s}.a", .{ target.libPrefix(), root_name }), |
| 191 | 191 | }, |
| 192 | 192 | .nvptx => return std.fmt.allocPrint(allocator, "{s}", .{root_name}), |
| 193 | .dxcontainer => @panic("TODO what's the file extension for these?"), | |
| 193 | 194 | } |
| 194 | 195 | } |
| 195 | 196 |
lib/std/zig/CrossTarget.zig+6| ... | ... | @@ -118,6 +118,7 @@ fn updateOsVersionRange(self: *CrossTarget, os: Target.Os) void { |
| 118 | 118 | .nvcl, |
| 119 | 119 | .amdhsa, |
| 120 | 120 | .ps4, |
| 121 | .ps5, | |
| 121 | 122 | .elfiamcu, |
| 122 | 123 | .mesa3d, |
| 123 | 124 | .contiki, |
| ... | ... | @@ -126,6 +127,8 @@ fn updateOsVersionRange(self: *CrossTarget, os: Target.Os) void { |
| 126 | 127 | .hurd, |
| 127 | 128 | .wasi, |
| 128 | 129 | .emscripten, |
| 130 | .driverkit, | |
| 131 | .shadermodel, | |
| 129 | 132 | .uefi, |
| 130 | 133 | .opencl, |
| 131 | 134 | .glsl450, |
| ... | ... | @@ -663,6 +666,7 @@ fn parseOs(result: *CrossTarget, diags: *ParseOptions.Diagnostics, text: []const |
| 663 | 666 | .nvcl, |
| 664 | 667 | .amdhsa, |
| 665 | 668 | .ps4, |
| 669 | .ps5, | |
| 666 | 670 | .elfiamcu, |
| 667 | 671 | .mesa3d, |
| 668 | 672 | .contiki, |
| ... | ... | @@ -676,6 +680,8 @@ fn parseOs(result: *CrossTarget, diags: *ParseOptions.Diagnostics, text: []const |
| 676 | 680 | .glsl450, |
| 677 | 681 | .vulkan, |
| 678 | 682 | .plan9, |
| 683 | .driverkit, | |
| 684 | .shadermodel, | |
| 679 | 685 | .other, |
| 680 | 686 | => return error.InvalidOperatingSystemVersion, |
| 681 | 687 |
src/clang.zig+14-9| ... | ... | @@ -859,7 +859,7 @@ pub const StmtExpr = opaque { |
| 859 | 859 | |
| 860 | 860 | pub const StringLiteral = opaque { |
| 861 | 861 | pub const getKind = ZigClangStringLiteral_getKind; |
| 862 | extern fn ZigClangStringLiteral_getKind(*const StringLiteral) StringLiteral_StringKind; | |
| 862 | extern fn ZigClangStringLiteral_getKind(*const StringLiteral) CharacterLiteral_CharacterKind; | |
| 863 | 863 | |
| 864 | 864 | pub const getCodeUnit = ZigClangStringLiteral_getCodeUnit; |
| 865 | 865 | extern fn ZigClangStringLiteral_getCodeUnit(*const StringLiteral, usize) u32; |
| ... | ... | @@ -1117,6 +1117,7 @@ pub const TypeClass = enum(c_int) { |
| 1117 | 1117 | VariableArray, |
| 1118 | 1118 | Atomic, |
| 1119 | 1119 | Attributed, |
| 1120 | BTFTagAttributed, | |
| 1120 | 1121 | BitInt, |
| 1121 | 1122 | BlockPointer, |
| 1122 | 1123 | Builtin, |
| ... | ... | @@ -1202,25 +1203,33 @@ const StmtClass = enum(c_int) { |
| 1202 | 1203 | OMPForDirectiveClass, |
| 1203 | 1204 | OMPForSimdDirectiveClass, |
| 1204 | 1205 | OMPGenericLoopDirectiveClass, |
| 1206 | OMPMaskedTaskLoopDirectiveClass, | |
| 1207 | OMPMaskedTaskLoopSimdDirectiveClass, | |
| 1205 | 1208 | OMPMasterTaskLoopDirectiveClass, |
| 1206 | 1209 | OMPMasterTaskLoopSimdDirectiveClass, |
| 1207 | 1210 | OMPParallelForDirectiveClass, |
| 1208 | 1211 | OMPParallelForSimdDirectiveClass, |
| 1212 | OMPParallelGenericLoopDirectiveClass, | |
| 1213 | OMPParallelMaskedTaskLoopDirectiveClass, | |
| 1214 | OMPParallelMaskedTaskLoopSimdDirectiveClass, | |
| 1209 | 1215 | OMPParallelMasterTaskLoopDirectiveClass, |
| 1210 | 1216 | OMPParallelMasterTaskLoopSimdDirectiveClass, |
| 1211 | 1217 | OMPSimdDirectiveClass, |
| 1212 | 1218 | OMPTargetParallelForSimdDirectiveClass, |
| 1219 | OMPTargetParallelGenericLoopDirectiveClass, | |
| 1213 | 1220 | OMPTargetSimdDirectiveClass, |
| 1214 | 1221 | OMPTargetTeamsDistributeDirectiveClass, |
| 1215 | 1222 | OMPTargetTeamsDistributeParallelForDirectiveClass, |
| 1216 | 1223 | OMPTargetTeamsDistributeParallelForSimdDirectiveClass, |
| 1217 | 1224 | OMPTargetTeamsDistributeSimdDirectiveClass, |
| 1225 | OMPTargetTeamsGenericLoopDirectiveClass, | |
| 1218 | 1226 | OMPTaskLoopDirectiveClass, |
| 1219 | 1227 | OMPTaskLoopSimdDirectiveClass, |
| 1220 | 1228 | OMPTeamsDistributeDirectiveClass, |
| 1221 | 1229 | OMPTeamsDistributeParallelForDirectiveClass, |
| 1222 | 1230 | OMPTeamsDistributeParallelForSimdDirectiveClass, |
| 1223 | 1231 | OMPTeamsDistributeSimdDirectiveClass, |
| 1232 | OMPTeamsGenericLoopDirectiveClass, | |
| 1224 | 1233 | OMPTileDirectiveClass, |
| 1225 | 1234 | OMPUnrollDirectiveClass, |
| 1226 | 1235 | OMPMaskedDirectiveClass, |
| ... | ... | @@ -1228,6 +1237,7 @@ const StmtClass = enum(c_int) { |
| 1228 | 1237 | OMPMetaDirectiveClass, |
| 1229 | 1238 | OMPOrderedDirectiveClass, |
| 1230 | 1239 | OMPParallelDirectiveClass, |
| 1240 | OMPParallelMaskedDirectiveClass, | |
| 1231 | 1241 | OMPParallelMasterDirectiveClass, |
| 1232 | 1242 | OMPParallelSectionsDirectiveClass, |
| 1233 | 1243 | OMPScanDirectiveClass, |
| ... | ... | @@ -1532,6 +1542,7 @@ pub const DeclKind = enum(c_int) { |
| 1532 | 1542 | OMPDeclareMapper, |
| 1533 | 1543 | OMPDeclareReduction, |
| 1534 | 1544 | TemplateParamObject, |
| 1545 | UnnamedGlobalConstant, | |
| 1535 | 1546 | UnresolvedUsingValue, |
| 1536 | 1547 | OMPAllocate, |
| 1537 | 1548 | OMPRequires, |
| ... | ... | @@ -1805,6 +1816,8 @@ pub const CallingConv = enum(c_int) { |
| 1805 | 1816 | PreserveMost, |
| 1806 | 1817 | PreserveAll, |
| 1807 | 1818 | AArch64VectorCall, |
| 1819 | AArch64SVEPCS, | |
| 1820 | AMDGPUKernelCall, | |
| 1808 | 1821 | }; |
| 1809 | 1822 | |
| 1810 | 1823 | pub const StorageClass = enum(c_int) { |
| ... | ... | @@ -1826,14 +1839,6 @@ pub const APFloat_roundingMode = enum(i8) { |
| 1826 | 1839 | Invalid = -1, |
| 1827 | 1840 | }; |
| 1828 | 1841 | |
| 1829 | pub const StringLiteral_StringKind = enum(c_int) { | |
| 1830 | Ascii, | |
| 1831 | Wide, | |
| 1832 | UTF8, | |
| 1833 | UTF16, | |
| 1834 | UTF32, | |
| 1835 | }; | |
| 1836 | ||
| 1837 | 1842 | pub const CharacterLiteral_CharacterKind = enum(c_int) { |
| 1838 | 1843 | Ascii, |
| 1839 | 1844 | Wide, |
src/codegen/llvm.zig+24| ... | ... | @@ -41,7 +41,10 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 41 | 41 | .bpfel => "bpfel", |
| 42 | 42 | .bpfeb => "bpfeb", |
| 43 | 43 | .csky => "csky", |
| 44 | .dxil => "dxil", | |
| 44 | 45 | .hexagon => "hexagon", |
| 46 | .loongarch32 => "loongarch32", | |
| 47 | .loongarch64 => "loongarch64", | |
| 45 | 48 | .m68k => "m68k", |
| 46 | 49 | .mips => "mips", |
| 47 | 50 | .mipsel => "mipsel", |
| ... | ... | @@ -116,6 +119,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 116 | 119 | .nvcl => "nvcl", |
| 117 | 120 | .amdhsa => "amdhsa", |
| 118 | 121 | .ps4 => "ps4", |
| 122 | .ps5 => "ps5", | |
| 119 | 123 | .elfiamcu => "elfiamcu", |
| 120 | 124 | .mesa3d => "mesa3d", |
| 121 | 125 | .contiki => "contiki", |
| ... | ... | @@ -129,6 +133,8 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 129 | 133 | .ios => "ios", |
| 130 | 134 | .tvos => "tvos", |
| 131 | 135 | .watchos => "watchos", |
| 136 | .driverkit => "driverkit", | |
| 137 | .shadermodel => "shadermodel", | |
| 132 | 138 | .opencl, |
| 133 | 139 | .glsl450, |
| 134 | 140 | .vulkan, |
| ... | ... | @@ -171,6 +177,21 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 171 | 177 | .coreclr => "coreclr", |
| 172 | 178 | .simulator => "simulator", |
| 173 | 179 | .macabi => "macabi", |
| 180 | .pixel => "pixel", | |
| 181 | .vertex => "vertex", | |
| 182 | .geometry => "geometry", | |
| 183 | .hull => "hull", | |
| 184 | .domain => "domain", | |
| 185 | .compute => "compute", | |
| 186 | .library => "library", | |
| 187 | .raygeneration => "raygeneration", | |
| 188 | .intersection => "intersection", | |
| 189 | .anyhit => "anyhit", | |
| 190 | .closesthit => "closesthit", | |
| 191 | .miss => "miss", | |
| 192 | .callable => "callable", | |
| 193 | .mesh => "mesh", | |
| 194 | .amplification => "amplification", | |
| 174 | 195 | }; |
| 175 | 196 | try llvm_triple.appendSlice(llvm_abi); |
| 176 | 197 | |
| ... | ... | @@ -9030,6 +9051,9 @@ fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { |
| 9030 | 9051 | .kalimba, |
| 9031 | 9052 | .renderscript32, |
| 9032 | 9053 | .renderscript64, |
| 9054 | .dxil, | |
| 9055 | .loongarch32, | |
| 9056 | .loongarch64, | |
| 9033 | 9057 | => {}, |
| 9034 | 9058 | |
| 9035 | 9059 | .spu_2 => unreachable, // LLVM does not support this backend |
src/codegen/llvm/bindings.zig+10| ... | ... | @@ -1212,9 +1212,11 @@ pub const LinkWasm = ZigLLDLinkWasm; |
| 1212 | 1212 | pub const ObjectFormatType = enum(c_int) { |
| 1213 | 1213 | Unknown, |
| 1214 | 1214 | COFF, |
| 1215 | DXContainer, | |
| 1215 | 1216 | ELF, |
| 1216 | 1217 | GOFF, |
| 1217 | 1218 | MachO, |
| 1219 | SPIRV, | |
| 1218 | 1220 | Wasm, |
| 1219 | 1221 | XCOFF, |
| 1220 | 1222 | }; |
| ... | ... | @@ -1254,9 +1256,11 @@ pub const OSType = enum(c_int) { |
| 1254 | 1256 | NVCL, |
| 1255 | 1257 | AMDHSA, |
| 1256 | 1258 | PS4, |
| 1259 | PS5, | |
| 1257 | 1260 | ELFIAMCU, |
| 1258 | 1261 | TvOS, |
| 1259 | 1262 | WatchOS, |
| 1263 | DriverKit, | |
| 1260 | 1264 | Mesa3D, |
| 1261 | 1265 | Contiki, |
| 1262 | 1266 | AMDPAL, |
| ... | ... | @@ -1264,6 +1268,7 @@ pub const OSType = enum(c_int) { |
| 1264 | 1268 | Hurd, |
| 1265 | 1269 | WASI, |
| 1266 | 1270 | Emscripten, |
| 1271 | ShaderModel, | |
| 1267 | 1272 | }; |
| 1268 | 1273 | |
| 1269 | 1274 | pub const ArchType = enum(c_int) { |
| ... | ... | @@ -1278,7 +1283,10 @@ pub const ArchType = enum(c_int) { |
| 1278 | 1283 | bpfel, |
| 1279 | 1284 | bpfeb, |
| 1280 | 1285 | csky, |
| 1286 | dxil, | |
| 1281 | 1287 | hexagon, |
| 1288 | loongarch32, | |
| 1289 | loongarch64, | |
| 1282 | 1290 | m68k, |
| 1283 | 1291 | mips, |
| 1284 | 1292 | mipsel, |
| ... | ... | @@ -1314,6 +1322,8 @@ pub const ArchType = enum(c_int) { |
| 1314 | 1322 | hsail64, |
| 1315 | 1323 | spir, |
| 1316 | 1324 | spir64, |
| 1325 | spirv32, | |
| 1326 | spirv64, | |
| 1317 | 1327 | kalimba, |
| 1318 | 1328 | shave, |
| 1319 | 1329 | lanai, |
src/link.zig+3| ... | ... | @@ -290,6 +290,7 @@ pub const File = struct { |
| 290 | 290 | .nvptx => &(try NvPtx.createEmpty(allocator, options)).base, |
| 291 | 291 | .hex => return error.HexObjectFormatUnimplemented, |
| 292 | 292 | .raw => return error.RawObjectFormatUnimplemented, |
| 293 | .dxcontainer => return error.DirectXContainerObjectFormatUnimplemented, | |
| 293 | 294 | }; |
| 294 | 295 | } |
| 295 | 296 | const emit = options.emit.?; |
| ... | ... | @@ -309,6 +310,7 @@ pub const File = struct { |
| 309 | 310 | .nvptx => &(try NvPtx.createEmpty(allocator, options)).base, |
| 310 | 311 | .hex => return error.HexObjectFormatUnimplemented, |
| 311 | 312 | .raw => return error.RawObjectFormatUnimplemented, |
| 313 | .dxcontainer => return error.DirectXContainerObjectFormatUnimplemented, | |
| 312 | 314 | }; |
| 313 | 315 | } |
| 314 | 316 | // Open a temporary object file, not the final output file because we |
| ... | ... | @@ -330,6 +332,7 @@ pub const File = struct { |
| 330 | 332 | .nvptx => &(try NvPtx.openPath(allocator, sub_path, options)).base, |
| 331 | 333 | .hex => return error.HexObjectFormatUnimplemented, |
| 332 | 334 | .raw => return error.RawObjectFormatUnimplemented, |
| 335 | .dxcontainer => return error.DirectXContainerObjectFormatUnimplemented, | |
| 333 | 336 | }; |
| 334 | 337 | |
| 335 | 338 | if (use_lld) { |
src/stage1/stage1.h+3| ... | ... | @@ -83,9 +83,11 @@ enum Os { |
| 83 | 83 | OsNVCL, // NVIDIA OpenCL |
| 84 | 84 | OsAMDHSA, // AMD HSA Runtime |
| 85 | 85 | OsPS4, |
| 86 | OsPS5, | |
| 86 | 87 | OsELFIAMCU, |
| 87 | 88 | OsTvOS, // Apple tvOS |
| 88 | 89 | OsWatchOS, // Apple watchOS |
| 90 | OsDriverKit, // Apple DriverKit | |
| 89 | 91 | OsMesa3D, |
| 90 | 92 | OsContiki, |
| 91 | 93 | OsAMDPAL, |
| ... | ... | @@ -93,6 +95,7 @@ enum Os { |
| 93 | 95 | OsHurd, |
| 94 | 96 | OsWASI, |
| 95 | 97 | OsEmscripten, |
| 98 | OsShaderModel, // DirectX ShaderModel | |
| 96 | 99 | OsUefi, |
| 97 | 100 | OsOpenCL, |
| 98 | 101 | OsGLSL450, |
src/stage1/target.cpp+55-2| ... | ... | @@ -24,7 +24,10 @@ static const ZigLLVM_ArchType arch_list[] = { |
| 24 | 24 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) |
| 25 | 25 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) |
| 26 | 26 | ZigLLVM_csky, // CSKY: csky |
| 27 | ZigLLVM_dxil, // DXIL 32-bit DirectX bytecode | |
| 27 | 28 | ZigLLVM_hexagon, // Hexagon: hexagon |
| 29 | ZigLLVM_loongarch32, // LoongArch (32-bit): loongarch32 | |
| 30 | ZigLLVM_loongarch64, // LoongArch (64-bit): loongarch64 | |
| 28 | 31 | ZigLLVM_m68k, // M68k: Motorola 680x0 family |
| 29 | 32 | ZigLLVM_mips, // MIPS: mips, mipsallegrex, mipsr6 |
| 30 | 33 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexe, mipsr6el |
| ... | ... | @@ -114,9 +117,11 @@ static const Os os_list[] = { |
| 114 | 117 | OsNVCL, // NVIDIA OpenCL |
| 115 | 118 | OsAMDHSA, // AMD HSA Runtime |
| 116 | 119 | OsPS4, |
| 120 | OsPS5, | |
| 117 | 121 | OsELFIAMCU, |
| 118 | 122 | OsTvOS, // Apple tvOS |
| 119 | 123 | OsWatchOS, // Apple watchOS |
| 124 | OsDriverKit, // Apple DriverKit | |
| 120 | 125 | OsMesa3D, |
| 121 | 126 | OsContiki, |
| 122 | 127 | OsAMDPAL, |
| ... | ... | @@ -124,6 +129,7 @@ static const Os os_list[] = { |
| 124 | 129 | OsHurd, |
| 125 | 130 | OsWASI, |
| 126 | 131 | OsEmscripten, |
| 132 | OsShaderModel, // DirectX ShaderModel | |
| 127 | 133 | OsUefi, |
| 128 | 134 | OsOpenCL, |
| 129 | 135 | OsGLSL450, |
| ... | ... | @@ -156,16 +162,34 @@ static const ZigLLVM_EnvironmentType abi_list[] = { |
| 156 | 162 | ZigLLVM_Itanium, |
| 157 | 163 | ZigLLVM_Cygnus, |
| 158 | 164 | ZigLLVM_CoreCLR, |
| 159 | ZigLLVM_Simulator, | |
| 160 | ZigLLVM_MacABI, | |
| 165 | ZigLLVM_Simulator, // Simulator variants of other systems, e.g., Apple's iOS | |
| 166 | ZigLLVM_MacABI, // Mac Catalyst variant of Apple's iOS deployment target. | |
| 167 | ||
| 168 | ZigLLVM_Pixel, | |
| 169 | ZigLLVM_Vertex, | |
| 170 | ZigLLVM_Geometry, | |
| 171 | ZigLLVM_Hull, | |
| 172 | ZigLLVM_Domain, | |
| 173 | ZigLLVM_Compute, | |
| 174 | ZigLLVM_Library, | |
| 175 | ZigLLVM_RayGeneration, | |
| 176 | ZigLLVM_Intersection, | |
| 177 | ZigLLVM_AnyHit, | |
| 178 | ZigLLVM_ClosestHit, | |
| 179 | ZigLLVM_Miss, | |
| 180 | ZigLLVM_Callable, | |
| 181 | ZigLLVM_Mesh, | |
| 182 | ZigLLVM_Amplification, | |
| 161 | 183 | }; |
| 162 | 184 | |
| 163 | 185 | static const ZigLLVM_ObjectFormatType oformat_list[] = { |
| 164 | 186 | ZigLLVM_UnknownObjectFormat, |
| 165 | 187 | ZigLLVM_COFF, |
| 188 | ZigLLVM_DXContainer, | |
| 166 | 189 | ZigLLVM_ELF, |
| 167 | 190 | ZigLLVM_GOFF, |
| 168 | 191 | ZigLLVM_MachO, |
| 192 | ZigLLVM_SPIRV, | |
| 169 | 193 | ZigLLVM_Wasm, |
| 170 | 194 | ZigLLVM_XCOFF, |
| 171 | 195 | }; |
| ... | ... | @@ -183,9 +207,11 @@ const char *target_oformat_name(ZigLLVM_ObjectFormatType oformat) { |
| 183 | 207 | switch (oformat) { |
| 184 | 208 | case ZigLLVM_UnknownObjectFormat: return "unknown"; |
| 185 | 209 | case ZigLLVM_COFF: return "coff"; |
| 210 | case ZigLLVM_DXContainer: return "dxcontainer"; | |
| 186 | 211 | case ZigLLVM_ELF: return "elf"; |
| 187 | 212 | case ZigLLVM_GOFF: return "goff"; |
| 188 | 213 | case ZigLLVM_MachO: return "macho"; |
| 214 | case ZigLLVM_SPIRV: return "spirv"; | |
| 189 | 215 | case ZigLLVM_Wasm: return "wasm"; |
| 190 | 216 | case ZigLLVM_XCOFF: return "xcoff"; |
| 191 | 217 | } |
| ... | ... | @@ -276,12 +302,16 @@ ZigLLVM_OSType get_llvm_os_type(Os os_type) { |
| 276 | 302 | return ZigLLVM_AMDHSA; |
| 277 | 303 | case OsPS4: |
| 278 | 304 | return ZigLLVM_PS4; |
| 305 | case OsPS5: | |
| 306 | return ZigLLVM_PS5; | |
| 279 | 307 | case OsELFIAMCU: |
| 280 | 308 | return ZigLLVM_ELFIAMCU; |
| 281 | 309 | case OsTvOS: |
| 282 | 310 | return ZigLLVM_TvOS; |
| 283 | 311 | case OsWatchOS: |
| 284 | 312 | return ZigLLVM_WatchOS; |
| 313 | case OsDriverKit: | |
| 314 | return ZigLLVM_DriverKit; | |
| 285 | 315 | case OsMesa3D: |
| 286 | 316 | return ZigLLVM_Mesa3D; |
| 287 | 317 | case OsContiki: |
| ... | ... | @@ -296,6 +326,8 @@ ZigLLVM_OSType get_llvm_os_type(Os os_type) { |
| 296 | 326 | return ZigLLVM_WASI; |
| 297 | 327 | case OsEmscripten: |
| 298 | 328 | return ZigLLVM_Emscripten; |
| 329 | case OsShaderModel: | |
| 330 | return ZigLLVM_ShaderModel; | |
| 299 | 331 | } |
| 300 | 332 | zig_unreachable(); |
| 301 | 333 | } |
| ... | ... | @@ -334,9 +366,11 @@ const char *target_os_name(Os os_type) { |
| 334 | 366 | case OsNVCL: // NVIDIA OpenCL |
| 335 | 367 | case OsAMDHSA: // AMD HSA Runtime |
| 336 | 368 | case OsPS4: |
| 369 | case OsPS5: | |
| 337 | 370 | case OsELFIAMCU: |
| 338 | 371 | case OsTvOS: // Apple tvOS |
| 339 | 372 | case OsWatchOS: // Apple watchOS |
| 373 | case OsDriverKit: | |
| 340 | 374 | case OsMesa3D: |
| 341 | 375 | case OsContiki: |
| 342 | 376 | case OsAMDPAL: |
| ... | ... | @@ -344,6 +378,7 @@ const char *target_os_name(Os os_type) { |
| 344 | 378 | case OsHurd: |
| 345 | 379 | case OsWASI: |
| 346 | 380 | case OsEmscripten: |
| 381 | case OsShaderModel: | |
| 347 | 382 | case OsOpenCL: |
| 348 | 383 | case OsGLSL450: |
| 349 | 384 | case OsVulkan: |
| ... | ... | @@ -532,6 +567,8 @@ uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 532 | 567 | case ZigLLVM_aarch64_32: |
| 533 | 568 | case ZigLLVM_csky: |
| 534 | 569 | case ZigLLVM_spirv32: |
| 570 | case ZigLLVM_loongarch32: | |
| 571 | case ZigLLVM_dxil: | |
| 535 | 572 | return 32; |
| 536 | 573 | |
| 537 | 574 | case ZigLLVM_aarch64: |
| ... | ... | @@ -556,6 +593,7 @@ uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 556 | 593 | case ZigLLVM_renderscript64: |
| 557 | 594 | case ZigLLVM_ve: |
| 558 | 595 | case ZigLLVM_spirv64: |
| 596 | case ZigLLVM_loongarch64: | |
| 559 | 597 | return 64; |
| 560 | 598 | } |
| 561 | 599 | zig_unreachable(); |
| ... | ... | @@ -601,6 +639,8 @@ uint32_t target_arch_largest_atomic_bits(ZigLLVM_ArchType arch) { |
| 601 | 639 | case ZigLLVM_renderscript32: |
| 602 | 640 | case ZigLLVM_csky: |
| 603 | 641 | case ZigLLVM_spirv32: |
| 642 | case ZigLLVM_loongarch32: | |
| 643 | case ZigLLVM_dxil: | |
| 604 | 644 | return 32; |
| 605 | 645 | |
| 606 | 646 | case ZigLLVM_aarch64: |
| ... | ... | @@ -625,6 +665,7 @@ uint32_t target_arch_largest_atomic_bits(ZigLLVM_ArchType arch) { |
| 625 | 665 | case ZigLLVM_renderscript64: |
| 626 | 666 | case ZigLLVM_ve: |
| 627 | 667 | case ZigLLVM_spirv64: |
| 668 | case ZigLLVM_loongarch64: | |
| 628 | 669 | return 64; |
| 629 | 670 | |
| 630 | 671 | case ZigLLVM_x86_64: |
| ... | ... | @@ -751,6 +792,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 751 | 792 | case OsAIX: |
| 752 | 793 | case OsAMDHSA: |
| 753 | 794 | case OsPS4: |
| 795 | case OsPS5: | |
| 754 | 796 | case OsELFIAMCU: |
| 755 | 797 | case OsTvOS: |
| 756 | 798 | case OsWatchOS: |
| ... | ... | @@ -763,6 +805,8 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 763 | 805 | case OsOpenCL: |
| 764 | 806 | case OsGLSL450: |
| 765 | 807 | case OsVulkan: |
| 808 | case OsDriverKit: | |
| 809 | case OsShaderModel: | |
| 766 | 810 | zig_panic("TODO c type size in bits for this target"); |
| 767 | 811 | } |
| 768 | 812 | zig_unreachable(); |
| ... | ... | @@ -860,6 +904,9 @@ const char *arch_stack_pointer_register_name(ZigLLVM_ArchType arch) { |
| 860 | 904 | case ZigLLVM_tcele: |
| 861 | 905 | case ZigLLVM_xcore: |
| 862 | 906 | case ZigLLVM_ve: |
| 907 | case ZigLLVM_dxil: | |
| 908 | case ZigLLVM_loongarch32: | |
| 909 | case ZigLLVM_loongarch64: | |
| 863 | 910 | zig_panic("TODO populate this table with stack pointer register name for this CPU architecture"); |
| 864 | 911 | } |
| 865 | 912 | zig_unreachable(); |
| ... | ... | @@ -927,6 +974,9 @@ bool target_is_arm(const ZigTarget *target) { |
| 927 | 974 | case ZigLLVM_ve: |
| 928 | 975 | case ZigLLVM_spirv32: |
| 929 | 976 | case ZigLLVM_spirv64: |
| 977 | case ZigLLVM_dxil: | |
| 978 | case ZigLLVM_loongarch32: | |
| 979 | case ZigLLVM_loongarch64: | |
| 930 | 980 | return false; |
| 931 | 981 | } |
| 932 | 982 | zig_unreachable(); |
| ... | ... | @@ -973,6 +1023,7 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) { |
| 973 | 1023 | case OsNVCL: |
| 974 | 1024 | case OsAMDHSA: |
| 975 | 1025 | case OsPS4: |
| 1026 | case OsPS5: | |
| 976 | 1027 | case OsELFIAMCU: |
| 977 | 1028 | case OsMesa3D: |
| 978 | 1029 | case OsContiki: |
| ... | ... | @@ -1004,6 +1055,8 @@ ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) { |
| 1004 | 1055 | case OsIOS: |
| 1005 | 1056 | case OsTvOS: |
| 1006 | 1057 | case OsWatchOS: |
| 1058 | case OsDriverKit: | |
| 1059 | case OsShaderModel: | |
| 1007 | 1060 | return ZigLLVM_UnknownEnvironment; |
| 1008 | 1061 | } |
| 1009 | 1062 | zig_unreachable(); |
src/stage1/zig0.cpp+6| ... | ... | @@ -112,6 +112,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { |
| 112 | 112 | return OsAMDHSA; |
| 113 | 113 | case ZigLLVM_PS4: |
| 114 | 114 | return OsPS4; |
| 115 | case ZigLLVM_PS5: | |
| 116 | return OsPS5; | |
| 115 | 117 | case ZigLLVM_ELFIAMCU: |
| 116 | 118 | return OsELFIAMCU; |
| 117 | 119 | case ZigLLVM_TvOS: |
| ... | ... | @@ -132,6 +134,10 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { |
| 132 | 134 | return OsWASI; |
| 133 | 135 | case ZigLLVM_Emscripten: |
| 134 | 136 | return OsEmscripten; |
| 137 | case ZigLLVM_DriverKit: | |
| 138 | return OsDriverKit; | |
| 139 | case ZigLLVM_ShaderModel: | |
| 140 | return OsShaderModel; | |
| 135 | 141 | } |
| 136 | 142 | zig_unreachable(); |
| 137 | 143 | } |
src/target.zig+30| ... | ... | @@ -107,6 +107,23 @@ pub fn libCGenericName(target: std.Target) [:0]const u8 { |
| 107 | 107 | .simulator, |
| 108 | 108 | .macabi, |
| 109 | 109 | => unreachable, |
| 110 | ||
| 111 | .pixel, | |
| 112 | .vertex, | |
| 113 | .geometry, | |
| 114 | .hull, | |
| 115 | .domain, | |
| 116 | .compute, | |
| 117 | .library, | |
| 118 | .raygeneration, | |
| 119 | .intersection, | |
| 120 | .anyhit, | |
| 121 | .closesthit, | |
| 122 | .miss, | |
| 123 | .callable, | |
| 124 | .mesh, | |
| 125 | .amplification, | |
| 126 | => unreachable, | |
| 110 | 127 | } |
| 111 | 128 | } |
| 112 | 129 | |
| ... | ... | @@ -219,6 +236,7 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { |
| 219 | 236 | .hex, |
| 220 | 237 | .raw, |
| 221 | 238 | .nvptx, |
| 239 | .dxcontainer, | |
| 222 | 240 | => {}, |
| 223 | 241 | } |
| 224 | 242 | |
| ... | ... | @@ -233,7 +251,10 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { |
| 233 | 251 | .bpfel, |
| 234 | 252 | .bpfeb, |
| 235 | 253 | .csky, |
| 254 | .dxil, | |
| 236 | 255 | .hexagon, |
| 256 | .loongarch32, | |
| 257 | .loongarch64, | |
| 237 | 258 | .m68k, |
| 238 | 259 | .mips, |
| 239 | 260 | .mipsel, |
| ... | ... | @@ -335,6 +356,7 @@ pub fn osToLLVM(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 335 | 356 | .nvcl => .NVCL, |
| 336 | 357 | .amdhsa => .AMDHSA, |
| 337 | 358 | .ps4 => .PS4, |
| 359 | .ps5 => .PS5, | |
| 338 | 360 | .elfiamcu => .ELFIAMCU, |
| 339 | 361 | .tvos => .TvOS, |
| 340 | 362 | .watchos => .WatchOS, |
| ... | ... | @@ -345,6 +367,8 @@ pub fn osToLLVM(os_tag: std.Target.Os.Tag) llvm.OSType { |
| 345 | 367 | .hurd => .Hurd, |
| 346 | 368 | .wasi => .WASI, |
| 347 | 369 | .emscripten => .Emscripten, |
| 370 | .driverkit => .DriverKit, | |
| 371 | .shadermodel => .ShaderModel, | |
| 348 | 372 | }; |
| 349 | 373 | } |
| 350 | 374 | |
| ... | ... | @@ -360,7 +384,10 @@ pub fn archToLLVM(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 360 | 384 | .bpfel => .bpfel, |
| 361 | 385 | .bpfeb => .bpfeb, |
| 362 | 386 | .csky => .csky, |
| 387 | .dxil => .dxil, | |
| 363 | 388 | .hexagon => .hexagon, |
| 389 | .loongarch32 => .loongarch32, | |
| 390 | .loongarch64 => .loongarch64, | |
| 364 | 391 | .m68k => .m68k, |
| 365 | 392 | .mips => .mips, |
| 366 | 393 | .mipsel => .mipsel, |
| ... | ... | @@ -627,6 +654,8 @@ pub fn atomicPtrAlignment( |
| 627 | 654 | .renderscript32, |
| 628 | 655 | .csky, |
| 629 | 656 | .spirv32, |
| 657 | .dxil, | |
| 658 | .loongarch32, | |
| 630 | 659 | => 32, |
| 631 | 660 | |
| 632 | 661 | .aarch64, |
| ... | ... | @@ -651,6 +680,7 @@ pub fn atomicPtrAlignment( |
| 651 | 680 | .renderscript64, |
| 652 | 681 | .ve, |
| 653 | 682 | .spirv64, |
| 683 | .loongarch64, | |
| 654 | 684 | => 64, |
| 655 | 685 | |
| 656 | 686 | .x86_64 => 128, |
src/type.zig+3| ... | ... | @@ -6627,6 +6627,7 @@ pub const CType = enum { |
| 6627 | 6627 | .nvcl, |
| 6628 | 6628 | .amdhsa, |
| 6629 | 6629 | .ps4, |
| 6630 | .ps5, | |
| 6630 | 6631 | .elfiamcu, |
| 6631 | 6632 | .mesa3d, |
| 6632 | 6633 | .contiki, |
| ... | ... | @@ -6636,6 +6637,8 @@ pub const CType = enum { |
| 6636 | 6637 | .opencl, |
| 6637 | 6638 | .glsl450, |
| 6638 | 6639 | .vulkan, |
| 6640 | .driverkit, | |
| 6641 | .shadermodel, | |
| 6639 | 6642 | => @panic("TODO specify the C integer and float type sizes for this OS"), |
| 6640 | 6643 | } |
| 6641 | 6644 | } |
src/zig_clang.cpp+28-18| ... | ... | @@ -317,6 +317,7 @@ void ZigClang_detect_enum_TypeClass(clang::Type::TypeClass ty) { |
| 317 | 317 | case clang::Type::Enum: |
| 318 | 318 | case clang::Type::Elaborated: |
| 319 | 319 | case clang::Type::Attributed: |
| 320 | case clang::Type::BTFTagAttributed: | |
| 320 | 321 | case clang::Type::BitInt: |
| 321 | 322 | case clang::Type::TemplateTypeParm: |
| 322 | 323 | case clang::Type::SubstTemplateTypeParm: |
| ... | ... | @@ -346,6 +347,7 @@ static_assert((clang::Type::TypeClass)ZigClangType_IncompleteArray == clang::Typ |
| 346 | 347 | static_assert((clang::Type::TypeClass)ZigClangType_VariableArray == clang::Type::VariableArray, ""); |
| 347 | 348 | static_assert((clang::Type::TypeClass)ZigClangType_Atomic == clang::Type::Atomic, ""); |
| 348 | 349 | static_assert((clang::Type::TypeClass)ZigClangType_Attributed == clang::Type::Attributed, ""); |
| 350 | static_assert((clang::Type::TypeClass)ZigClangType_BTFTagAttributed == clang::Type::BTFTagAttributed, ""); | |
| 349 | 351 | static_assert((clang::Type::TypeClass)ZigClangType_BitInt == clang::Type::BitInt, ""); |
| 350 | 352 | static_assert((clang::Type::TypeClass)ZigClangType_BlockPointer == clang::Type::BlockPointer, ""); |
| 351 | 353 | static_assert((clang::Type::TypeClass)ZigClangType_Builtin == clang::Type::Builtin, ""); |
| ... | ... | @@ -432,25 +434,33 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) { |
| 432 | 434 | case clang::Stmt::OMPForDirectiveClass: |
| 433 | 435 | case clang::Stmt::OMPForSimdDirectiveClass: |
| 434 | 436 | case clang::Stmt::OMPGenericLoopDirectiveClass: |
| 437 | case clang::Stmt::OMPMaskedTaskLoopDirectiveClass: | |
| 438 | case clang::Stmt::OMPMaskedTaskLoopSimdDirectiveClass: | |
| 435 | 439 | case clang::Stmt::OMPMasterTaskLoopDirectiveClass: |
| 436 | 440 | case clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass: |
| 437 | 441 | case clang::Stmt::OMPParallelForDirectiveClass: |
| 438 | 442 | case clang::Stmt::OMPParallelForSimdDirectiveClass: |
| 443 | case clang::Stmt::OMPParallelGenericLoopDirectiveClass: | |
| 444 | case clang::Stmt::OMPParallelMaskedTaskLoopDirectiveClass: | |
| 445 | case clang::Stmt::OMPParallelMaskedTaskLoopSimdDirectiveClass: | |
| 439 | 446 | case clang::Stmt::OMPParallelMasterTaskLoopDirectiveClass: |
| 440 | 447 | case clang::Stmt::OMPParallelMasterTaskLoopSimdDirectiveClass: |
| 441 | 448 | case clang::Stmt::OMPSimdDirectiveClass: |
| 442 | 449 | case clang::Stmt::OMPTargetParallelForSimdDirectiveClass: |
| 450 | case clang::Stmt::OMPTargetParallelGenericLoopDirectiveClass: | |
| 443 | 451 | case clang::Stmt::OMPTargetSimdDirectiveClass: |
| 444 | 452 | case clang::Stmt::OMPTargetTeamsDistributeDirectiveClass: |
| 445 | 453 | case clang::Stmt::OMPTargetTeamsDistributeParallelForDirectiveClass: |
| 446 | 454 | case clang::Stmt::OMPTargetTeamsDistributeParallelForSimdDirectiveClass: |
| 447 | 455 | case clang::Stmt::OMPTargetTeamsDistributeSimdDirectiveClass: |
| 456 | case clang::Stmt::OMPTargetTeamsGenericLoopDirectiveClass: | |
| 448 | 457 | case clang::Stmt::OMPTaskLoopDirectiveClass: |
| 449 | 458 | case clang::Stmt::OMPTaskLoopSimdDirectiveClass: |
| 450 | 459 | case clang::Stmt::OMPTeamsDistributeDirectiveClass: |
| 451 | 460 | case clang::Stmt::OMPTeamsDistributeParallelForDirectiveClass: |
| 452 | 461 | case clang::Stmt::OMPTeamsDistributeParallelForSimdDirectiveClass: |
| 453 | 462 | case clang::Stmt::OMPTeamsDistributeSimdDirectiveClass: |
| 463 | case clang::Stmt::OMPTeamsGenericLoopDirectiveClass: | |
| 454 | 464 | case clang::Stmt::OMPTileDirectiveClass: |
| 455 | 465 | case clang::Stmt::OMPUnrollDirectiveClass: |
| 456 | 466 | case clang::Stmt::OMPMaskedDirectiveClass: |
| ... | ... | @@ -458,6 +468,7 @@ void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) { |
| 458 | 468 | case clang::Stmt::OMPMetaDirectiveClass: |
| 459 | 469 | case clang::Stmt::OMPOrderedDirectiveClass: |
| 460 | 470 | case clang::Stmt::OMPParallelDirectiveClass: |
| 471 | case clang::Stmt::OMPParallelMaskedDirectiveClass: | |
| 461 | 472 | case clang::Stmt::OMPParallelMasterDirectiveClass: |
| 462 | 473 | case clang::Stmt::OMPParallelSectionsDirectiveClass: |
| 463 | 474 | case clang::Stmt::OMPScanDirectiveClass: |
| ... | ... | @@ -659,25 +670,33 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeSimdDirectiveCla |
| 659 | 670 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForDirectiveClass == clang::Stmt::OMPForDirectiveClass, ""); |
| 660 | 671 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForSimdDirectiveClass == clang::Stmt::OMPForSimdDirectiveClass, ""); |
| 661 | 672 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPGenericLoopDirectiveClass == clang::Stmt::OMPGenericLoopDirectiveClass, ""); |
| 673 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedTaskLoopDirectiveClass == clang::Stmt::OMPMaskedTaskLoopDirectiveClass, ""); | |
| 674 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedTaskLoopSimdDirectiveClass == clang::Stmt::OMPMaskedTaskLoopSimdDirectiveClass, ""); | |
| 662 | 675 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopDirectiveClass == clang::Stmt::OMPMasterTaskLoopDirectiveClass, ""); |
| 663 | 676 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass == clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass, ""); |
| 664 | 677 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelForDirectiveClass == clang::Stmt::OMPParallelForDirectiveClass, ""); |
| 665 | 678 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelForSimdDirectiveClass == clang::Stmt::OMPParallelForSimdDirectiveClass, ""); |
| 679 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelGenericLoopDirectiveClass == clang::Stmt::OMPParallelGenericLoopDirectiveClass, ""); | |
| 680 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedTaskLoopDirectiveClass == clang::Stmt::OMPParallelMaskedTaskLoopDirectiveClass, ""); | |
| 681 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedTaskLoopSimdDirectiveClass == clang::Stmt::OMPParallelMaskedTaskLoopSimdDirectiveClass, ""); | |
| 666 | 682 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterTaskLoopDirectiveClass == clang::Stmt::OMPParallelMasterTaskLoopDirectiveClass, ""); |
| 667 | 683 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterTaskLoopSimdDirectiveClass == clang::Stmt::OMPParallelMasterTaskLoopSimdDirectiveClass, ""); |
| 668 | 684 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSimdDirectiveClass == clang::Stmt::OMPSimdDirectiveClass, ""); |
| 669 | 685 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelForSimdDirectiveClass == clang::Stmt::OMPTargetParallelForSimdDirectiveClass, ""); |
| 686 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelGenericLoopDirectiveClass == clang::Stmt::OMPTargetParallelGenericLoopDirectiveClass, ""); | |
| 670 | 687 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetSimdDirectiveClass == clang::Stmt::OMPTargetSimdDirectiveClass, ""); |
| 671 | 688 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeDirectiveClass, ""); |
| 672 | 689 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeParallelForDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeParallelForDirectiveClass, ""); |
| 673 | 690 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeParallelForSimdDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeParallelForSimdDirectiveClass, ""); |
| 674 | 691 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeSimdDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeSimdDirectiveClass, ""); |
| 692 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsGenericLoopDirectiveClass == clang::Stmt::OMPTargetTeamsGenericLoopDirectiveClass, ""); | |
| 675 | 693 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskLoopDirectiveClass == clang::Stmt::OMPTaskLoopDirectiveClass, ""); |
| 676 | 694 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskLoopSimdDirectiveClass == clang::Stmt::OMPTaskLoopSimdDirectiveClass, ""); |
| 677 | 695 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeDirectiveClass == clang::Stmt::OMPTeamsDistributeDirectiveClass, ""); |
| 678 | 696 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeParallelForDirectiveClass == clang::Stmt::OMPTeamsDistributeParallelForDirectiveClass, ""); |
| 679 | 697 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeParallelForSimdDirectiveClass == clang::Stmt::OMPTeamsDistributeParallelForSimdDirectiveClass, ""); |
| 680 | 698 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeSimdDirectiveClass == clang::Stmt::OMPTeamsDistributeSimdDirectiveClass, ""); |
| 699 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsGenericLoopDirectiveClass == clang::Stmt::OMPTeamsGenericLoopDirectiveClass, ""); | |
| 681 | 700 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTileDirectiveClass == clang::Stmt::OMPTileDirectiveClass, ""); |
| 682 | 701 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPUnrollDirectiveClass == clang::Stmt::OMPUnrollDirectiveClass, ""); |
| 683 | 702 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedDirectiveClass == clang::Stmt::OMPMaskedDirectiveClass, ""); |
| ... | ... | @@ -685,6 +704,7 @@ static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterDirectiveClass == cl |
| 685 | 704 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMetaDirectiveClass == clang::Stmt::OMPMetaDirectiveClass, ""); |
| 686 | 705 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPOrderedDirectiveClass == clang::Stmt::OMPOrderedDirectiveClass, ""); |
| 687 | 706 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelDirectiveClass == clang::Stmt::OMPParallelDirectiveClass, ""); |
| 707 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedDirectiveClass == clang::Stmt::OMPParallelMaskedDirectiveClass, ""); | |
| 688 | 708 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterDirectiveClass == clang::Stmt::OMPParallelMasterDirectiveClass, ""); |
| 689 | 709 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelSectionsDirectiveClass == clang::Stmt::OMPParallelSectionsDirectiveClass, ""); |
| 690 | 710 | static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPScanDirectiveClass == clang::Stmt::OMPScanDirectiveClass, ""); |
| ... | ... | @@ -958,6 +978,7 @@ void ZigClang_detect_enum_DeclKind(clang::Decl::Kind x) { |
| 958 | 978 | case clang::Decl::OMPDeclareMapper: |
| 959 | 979 | case clang::Decl::OMPDeclareReduction: |
| 960 | 980 | case clang::Decl::TemplateParamObject: |
| 981 | case clang::Decl::UnnamedGlobalConstant: | |
| 961 | 982 | case clang::Decl::UnresolvedUsingValue: |
| 962 | 983 | case clang::Decl::OMPAllocate: |
| 963 | 984 | case clang::Decl::OMPRequires: |
| ... | ... | @@ -1046,6 +1067,7 @@ static_assert((clang::Decl::Kind)ZigClangDeclMSGuid == clang::Decl::MSGuid, ""); |
| 1046 | 1067 | static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareMapper == clang::Decl::OMPDeclareMapper, ""); |
| 1047 | 1068 | static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareReduction == clang::Decl::OMPDeclareReduction, ""); |
| 1048 | 1069 | static_assert((clang::Decl::Kind)ZigClangDeclTemplateParamObject == clang::Decl::TemplateParamObject, ""); |
| 1070 | static_assert((clang::Decl::Kind)ZigClangDeclUnnamedGlobalConstant == clang::Decl::UnnamedGlobalConstant, ""); | |
| 1049 | 1071 | static_assert((clang::Decl::Kind)ZigClangDeclUnresolvedUsingValue == clang::Decl::UnresolvedUsingValue, ""); |
| 1050 | 1072 | static_assert((clang::Decl::Kind)ZigClangDeclOMPRequires == clang::Decl::OMPRequires, ""); |
| 1051 | 1073 | static_assert((clang::Decl::Kind)ZigClangDeclOMPThreadPrivate == clang::Decl::OMPThreadPrivate, ""); |
| ... | ... | @@ -1560,6 +1582,8 @@ void ZigClang_detect_enum_CallingConv(clang::CallingConv x) { |
| 1560 | 1582 | case clang::CC_PreserveMost: |
| 1561 | 1583 | case clang::CC_PreserveAll: |
| 1562 | 1584 | case clang::CC_AArch64VectorCall: |
| 1585 | case clang::CC_AArch64SVEPCS: | |
| 1586 | case clang::CC_AMDGPUKernelCall: | |
| 1563 | 1587 | break; |
| 1564 | 1588 | } |
| 1565 | 1589 | } |
| ... | ... | @@ -1583,6 +1607,8 @@ static_assert((clang::CallingConv)ZigClangCallingConv_SwiftAsync == clang::CC_Sw |
| 1583 | 1607 | static_assert((clang::CallingConv)ZigClangCallingConv_PreserveMost == clang::CC_PreserveMost, ""); |
| 1584 | 1608 | static_assert((clang::CallingConv)ZigClangCallingConv_PreserveAll == clang::CC_PreserveAll, ""); |
| 1585 | 1609 | static_assert((clang::CallingConv)ZigClangCallingConv_AArch64VectorCall == clang::CC_AArch64VectorCall, ""); |
| 1610 | static_assert((clang::CallingConv)ZigClangCallingConv_AArch64SVEPCS == clang::CC_AArch64SVEPCS, ""); | |
| 1611 | static_assert((clang::CallingConv)ZigClangCallingConv_AMDGPUKernelCall == clang::CC_AMDGPUKernelCall, ""); | |
| 1586 | 1612 | |
| 1587 | 1613 | void ZigClang_detect_enum_StorageClass(clang::StorageClass x) { |
| 1588 | 1614 | switch (x) { |
| ... | ... | @@ -1623,22 +1649,6 @@ static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_NearestTiesToAway |
| 1623 | 1649 | static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_Dynamic == llvm::RoundingMode::Dynamic, ""); |
| 1624 | 1650 | static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_Invalid == llvm::RoundingMode::Invalid, ""); |
| 1625 | 1651 | |
| 1626 | void ZigClang_detect_enum_StringKind(clang::StringLiteral::StringKind x) { | |
| 1627 | switch (x) { | |
| 1628 | case clang::StringLiteral::Ascii: | |
| 1629 | case clang::StringLiteral::Wide: | |
| 1630 | case clang::StringLiteral::UTF8: | |
| 1631 | case clang::StringLiteral::UTF16: | |
| 1632 | case clang::StringLiteral::UTF32: | |
| 1633 | break; | |
| 1634 | } | |
| 1635 | } | |
| 1636 | static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_Ascii == clang::StringLiteral::Ascii, ""); | |
| 1637 | static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_Wide == clang::StringLiteral::Wide, ""); | |
| 1638 | static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF8 == clang::StringLiteral::UTF8, ""); | |
| 1639 | static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF16 == clang::StringLiteral::UTF16, ""); | |
| 1640 | static_assert((clang::StringLiteral::StringKind)ZigClangStringLiteral_StringKind_UTF32 == clang::StringLiteral::UTF32, ""); | |
| 1641 | ||
| 1642 | 1652 | void ZigClang_detect_enum_CharacterKind(clang::CharacterLiteral::CharacterKind x) { |
| 1643 | 1653 | switch (x) { |
| 1644 | 1654 | case clang::CharacterLiteral::Ascii: |
| ... | ... | @@ -2724,9 +2734,9 @@ ZigClangAPFloatBase_Semantics ZigClangFloatingLiteral_getRawSemantics(const ZigC |
| 2724 | 2734 | return static_cast<ZigClangAPFloatBase_Semantics>(casted->getRawSemantics()); |
| 2725 | 2735 | } |
| 2726 | 2736 | |
| 2727 | enum ZigClangStringLiteral_StringKind ZigClangStringLiteral_getKind(const struct ZigClangStringLiteral *self) { | |
| 2737 | enum ZigClangCharacterLiteral_CharacterKind ZigClangStringLiteral_getKind(const struct ZigClangStringLiteral *self) { | |
| 2728 | 2738 | auto casted = reinterpret_cast<const clang::StringLiteral *>(self); |
| 2729 | return (ZigClangStringLiteral_StringKind)casted->getKind(); | |
| 2739 | return (ZigClangCharacterLiteral_CharacterKind)casted->getKind(); | |
| 2730 | 2740 | } |
| 2731 | 2741 | |
| 2732 | 2742 | uint32_t ZigClangStringLiteral_getCodeUnit(const struct ZigClangStringLiteral *self, size_t i) { |
src/zig_clang.h+32-20| ... | ... | @@ -252,6 +252,7 @@ enum ZigClangTypeClass { |
| 252 | 252 | ZigClangType_VariableArray, |
| 253 | 253 | ZigClangType_Atomic, |
| 254 | 254 | ZigClangType_Attributed, |
| 255 | ZigClangType_BTFTagAttributed, | |
| 255 | 256 | ZigClangType_BitInt, |
| 256 | 257 | ZigClangType_BlockPointer, |
| 257 | 258 | ZigClangType_Builtin, |
| ... | ... | @@ -337,25 +338,33 @@ enum ZigClangStmtClass { |
| 337 | 338 | ZigClangStmt_OMPForDirectiveClass, |
| 338 | 339 | ZigClangStmt_OMPForSimdDirectiveClass, |
| 339 | 340 | ZigClangStmt_OMPGenericLoopDirectiveClass, |
| 341 | ZigClangStmt_OMPMaskedTaskLoopDirectiveClass, | |
| 342 | ZigClangStmt_OMPMaskedTaskLoopSimdDirectiveClass, | |
| 340 | 343 | ZigClangStmt_OMPMasterTaskLoopDirectiveClass, |
| 341 | 344 | ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass, |
| 342 | 345 | ZigClangStmt_OMPParallelForDirectiveClass, |
| 343 | 346 | ZigClangStmt_OMPParallelForSimdDirectiveClass, |
| 347 | ZigClangStmt_OMPParallelGenericLoopDirectiveClass, | |
| 348 | ZigClangStmt_OMPParallelMaskedTaskLoopDirectiveClass, | |
| 349 | ZigClangStmt_OMPParallelMaskedTaskLoopSimdDirectiveClass, | |
| 344 | 350 | ZigClangStmt_OMPParallelMasterTaskLoopDirectiveClass, |
| 345 | 351 | ZigClangStmt_OMPParallelMasterTaskLoopSimdDirectiveClass, |
| 346 | 352 | ZigClangStmt_OMPSimdDirectiveClass, |
| 347 | 353 | ZigClangStmt_OMPTargetParallelForSimdDirectiveClass, |
| 354 | ZigClangStmt_OMPTargetParallelGenericLoopDirectiveClass, | |
| 348 | 355 | ZigClangStmt_OMPTargetSimdDirectiveClass, |
| 349 | 356 | ZigClangStmt_OMPTargetTeamsDistributeDirectiveClass, |
| 350 | 357 | ZigClangStmt_OMPTargetTeamsDistributeParallelForDirectiveClass, |
| 351 | 358 | ZigClangStmt_OMPTargetTeamsDistributeParallelForSimdDirectiveClass, |
| 352 | 359 | ZigClangStmt_OMPTargetTeamsDistributeSimdDirectiveClass, |
| 360 | ZigClangStmt_OMPTargetTeamsGenericLoopDirectiveClass, | |
| 353 | 361 | ZigClangStmt_OMPTaskLoopDirectiveClass, |
| 354 | 362 | ZigClangStmt_OMPTaskLoopSimdDirectiveClass, |
| 355 | 363 | ZigClangStmt_OMPTeamsDistributeDirectiveClass, |
| 356 | 364 | ZigClangStmt_OMPTeamsDistributeParallelForDirectiveClass, |
| 357 | 365 | ZigClangStmt_OMPTeamsDistributeParallelForSimdDirectiveClass, |
| 358 | 366 | ZigClangStmt_OMPTeamsDistributeSimdDirectiveClass, |
| 367 | ZigClangStmt_OMPTeamsGenericLoopDirectiveClass, | |
| 359 | 368 | ZigClangStmt_OMPTileDirectiveClass, |
| 360 | 369 | ZigClangStmt_OMPUnrollDirectiveClass, |
| 361 | 370 | ZigClangStmt_OMPMaskedDirectiveClass, |
| ... | ... | @@ -363,6 +372,7 @@ enum ZigClangStmtClass { |
| 363 | 372 | ZigClangStmt_OMPMetaDirectiveClass, |
| 364 | 373 | ZigClangStmt_OMPOrderedDirectiveClass, |
| 365 | 374 | ZigClangStmt_OMPParallelDirectiveClass, |
| 375 | ZigClangStmt_OMPParallelMaskedDirectiveClass, | |
| 366 | 376 | ZigClangStmt_OMPParallelMasterDirectiveClass, |
| 367 | 377 | ZigClangStmt_OMPParallelSectionsDirectiveClass, |
| 368 | 378 | ZigClangStmt_OMPScanDirectiveClass, |
| ... | ... | @@ -667,6 +677,7 @@ enum ZigClangDeclKind { |
| 667 | 677 | ZigClangDeclOMPDeclareMapper, |
| 668 | 678 | ZigClangDeclOMPDeclareReduction, |
| 669 | 679 | ZigClangDeclTemplateParamObject, |
| 680 | ZigClangDeclUnnamedGlobalConstant, | |
| 670 | 681 | ZigClangDeclUnresolvedUsingValue, |
| 671 | 682 | ZigClangDeclOMPAllocate, |
| 672 | 683 | ZigClangDeclOMPRequires, |
| ... | ... | @@ -921,25 +932,27 @@ enum ZigClangBuiltinTypeKind { |
| 921 | 932 | }; |
| 922 | 933 | |
| 923 | 934 | enum ZigClangCallingConv { |
| 924 | ZigClangCallingConv_C, // __attribute__((cdecl)) | |
| 925 | ZigClangCallingConv_X86StdCall, // __attribute__((stdcall)) | |
| 926 | ZigClangCallingConv_X86FastCall, // __attribute__((fastcall)) | |
| 927 | ZigClangCallingConv_X86ThisCall, // __attribute__((thiscall)) | |
| 928 | ZigClangCallingConv_X86VectorCall, // __attribute__((vectorcall)) | |
| 929 | ZigClangCallingConv_X86Pascal, // __attribute__((pascal)) | |
| 930 | ZigClangCallingConv_Win64, // __attribute__((ms_abi)) | |
| 931 | ZigClangCallingConv_X86_64SysV, // __attribute__((sysv_abi)) | |
| 932 | ZigClangCallingConv_X86RegCall, // __attribute__((regcall)) | |
| 933 | ZigClangCallingConv_AAPCS, // __attribute__((pcs("aapcs"))) | |
| 934 | ZigClangCallingConv_AAPCS_VFP, // __attribute__((pcs("aapcs-vfp"))) | |
| 935 | ZigClangCallingConv_IntelOclBicc, // __attribute__((intel_ocl_bicc)) | |
| 936 | ZigClangCallingConv_SpirFunction, // default for OpenCL functions on SPIR target | |
| 937 | ZigClangCallingConv_OpenCLKernel, // inferred for OpenCL kernels | |
| 938 | ZigClangCallingConv_Swift, // __attribute__((swiftcall)) | |
| 939 | ZigClangCallingConv_SwiftAsync, // __attribute__((swiftasynccall)) | |
| 940 | ZigClangCallingConv_PreserveMost, // __attribute__((preserve_most)) | |
| 941 | ZigClangCallingConv_PreserveAll, // __attribute__((preserve_all)) | |
| 942 | ZigClangCallingConv_AArch64VectorCall, // __attribute__((aarch64_vector_pcs)) | |
| 935 | ZigClangCallingConv_C, | |
| 936 | ZigClangCallingConv_X86StdCall, | |
| 937 | ZigClangCallingConv_X86FastCall, | |
| 938 | ZigClangCallingConv_X86ThisCall, | |
| 939 | ZigClangCallingConv_X86VectorCall, | |
| 940 | ZigClangCallingConv_X86Pascal, | |
| 941 | ZigClangCallingConv_Win64, | |
| 942 | ZigClangCallingConv_X86_64SysV, | |
| 943 | ZigClangCallingConv_X86RegCall, | |
| 944 | ZigClangCallingConv_AAPCS, | |
| 945 | ZigClangCallingConv_AAPCS_VFP, | |
| 946 | ZigClangCallingConv_IntelOclBicc, | |
| 947 | ZigClangCallingConv_SpirFunction, | |
| 948 | ZigClangCallingConv_OpenCLKernel, | |
| 949 | ZigClangCallingConv_Swift, | |
| 950 | ZigClangCallingConv_SwiftAsync, | |
| 951 | ZigClangCallingConv_PreserveMost, | |
| 952 | ZigClangCallingConv_PreserveAll, | |
| 953 | ZigClangCallingConv_AArch64VectorCall, | |
| 954 | ZigClangCallingConv_AArch64SVEPCS, | |
| 955 | ZigClangCallingConv_AMDGPUKernelCall, | |
| 943 | 956 | }; |
| 944 | 957 | |
| 945 | 958 | enum ZigClangStorageClass { |
| ... | ... | @@ -1253,7 +1266,6 @@ ZIG_EXTERN_C double ZigClangFloatingLiteral_getValueAsApproximateDouble(const Zi |
| 1253 | 1266 | ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangFloatingLiteral_getBeginLoc(const struct ZigClangFloatingLiteral *); |
| 1254 | 1267 | ZIG_EXTERN_C ZigClangAPFloatBase_Semantics ZigClangFloatingLiteral_getRawSemantics(const ZigClangFloatingLiteral *self); |
| 1255 | 1268 | |
| 1256 | ZIG_EXTERN_C enum ZigClangStringLiteral_StringKind ZigClangStringLiteral_getKind(const struct ZigClangStringLiteral *self); | |
| 1257 | 1269 | ZIG_EXTERN_C uint32_t ZigClangStringLiteral_getCodeUnit(const struct ZigClangStringLiteral *self, size_t i); |
| 1258 | 1270 | ZIG_EXTERN_C unsigned ZigClangStringLiteral_getLength(const struct ZigClangStringLiteral *self); |
| 1259 | 1271 | ZIG_EXTERN_C unsigned ZigClangStringLiteral_getCharByteWidth(const struct ZigClangStringLiteral *self); |
src/zig_llvm.h+35-5| ... | ... | @@ -324,8 +324,10 @@ ZIG_EXTERN_C void ZigLLVMAddFunctionAttrCold(LLVMValueRef fn); |
| 324 | 324 | ZIG_EXTERN_C void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv); |
| 325 | 325 | |
| 326 | 326 | |
| 327 | // copied from include/llvm/ADT/Triple.h | |
| 328 | // synchronize with target.cpp::arch_list | |
| 327 | // synchronize with llvm/include/ADT/Triple.h::ArchType | |
| 328 | // synchronize with std.Target.Cpu.Arch | |
| 329 | // synchronize with src/stage1/target.cpp::arch_list | |
| 330 | // synchronize with codegen/llvm/bindings.zig::ArchType | |
| 329 | 331 | enum ZigLLVM_ArchType { |
| 330 | 332 | ZigLLVM_UnknownArch, |
| 331 | 333 | |
| ... | ... | @@ -339,7 +341,10 @@ enum ZigLLVM_ArchType { |
| 339 | 341 | ZigLLVM_bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) |
| 340 | 342 | ZigLLVM_bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) |
| 341 | 343 | ZigLLVM_csky, // CSKY: csky |
| 344 | ZigLLVM_dxil, // DXIL 32-bit DirectX bytecode | |
| 342 | 345 | ZigLLVM_hexagon, // Hexagon: hexagon |
| 346 | ZigLLVM_loongarch32, // LoongArch (32-bit): loongarch32 | |
| 347 | ZigLLVM_loongarch64, // LoongArch (64-bit): loongarch64 | |
| 343 | 348 | ZigLLVM_m68k, // M68k: Motorola 680x0 family |
| 344 | 349 | ZigLLVM_mips, // MIPS: mips, mipsallegrex, mipsr6 |
| 345 | 350 | ZigLLVM_mipsel, // MIPSEL: mipsel, mipsallegrexe, mipsr6el |
| ... | ... | @@ -409,6 +414,10 @@ enum ZigLLVM_VendorType { |
| 409 | 414 | ZigLLVM_LastVendorType = ZigLLVM_OpenEmbedded |
| 410 | 415 | }; |
| 411 | 416 | |
| 417 | // synchronize with llvm/include/ADT/Triple.h::OsType | |
| 418 | // synchronize with std.Target.Os.Tag | |
| 419 | // synchronize with codegen/llvm/bindings.zig::OsType | |
| 420 | // synchronize with src/stage1/target.cpp::os_list | |
| 412 | 421 | enum ZigLLVM_OSType { |
| 413 | 422 | ZigLLVM_UnknownOS, |
| 414 | 423 | |
| ... | ... | @@ -437,9 +446,11 @@ enum ZigLLVM_OSType { |
| 437 | 446 | ZigLLVM_NVCL, // NVIDIA OpenCL |
| 438 | 447 | ZigLLVM_AMDHSA, // AMD HSA Runtime |
| 439 | 448 | ZigLLVM_PS4, |
| 449 | ZigLLVM_PS5, | |
| 440 | 450 | ZigLLVM_ELFIAMCU, |
| 441 | 451 | ZigLLVM_TvOS, // Apple tvOS |
| 442 | 452 | ZigLLVM_WatchOS, // Apple watchOS |
| 453 | ZigLLVM_DriverKit, // Apple DriverKit | |
| 443 | 454 | ZigLLVM_Mesa3D, |
| 444 | 455 | ZigLLVM_Contiki, |
| 445 | 456 | ZigLLVM_AMDPAL, // AMD PAL Runtime |
| ... | ... | @@ -447,8 +458,8 @@ enum ZigLLVM_OSType { |
| 447 | 458 | ZigLLVM_Hurd, // GNU/Hurd |
| 448 | 459 | ZigLLVM_WASI, // Experimental WebAssembly OS |
| 449 | 460 | ZigLLVM_Emscripten, |
| 450 | ||
| 451 | ZigLLVM_LastOSType = ZigLLVM_Emscripten | |
| 461 | ZigLLVM_ShaderModel, // DirectX ShaderModel | |
| 462 | ZigLLVM_LastOSType = ZigLLVM_ShaderModel | |
| 452 | 463 | }; |
| 453 | 464 | |
| 454 | 465 | // Synchronize with target.cpp::abi_list |
| ... | ... | @@ -477,16 +488,35 @@ enum ZigLLVM_EnvironmentType { |
| 477 | 488 | ZigLLVM_CoreCLR, |
| 478 | 489 | ZigLLVM_Simulator, // Simulator variants of other systems, e.g., Apple's iOS |
| 479 | 490 | ZigLLVM_MacABI, // Mac Catalyst variant of Apple's iOS deployment target. |
| 480 | ZigLLVM_LastEnvironmentType = ZigLLVM_MacABI | |
| 491 | ||
| 492 | ZigLLVM_Pixel, | |
| 493 | ZigLLVM_Vertex, | |
| 494 | ZigLLVM_Geometry, | |
| 495 | ZigLLVM_Hull, | |
| 496 | ZigLLVM_Domain, | |
| 497 | ZigLLVM_Compute, | |
| 498 | ZigLLVM_Library, | |
| 499 | ZigLLVM_RayGeneration, | |
| 500 | ZigLLVM_Intersection, | |
| 501 | ZigLLVM_AnyHit, | |
| 502 | ZigLLVM_ClosestHit, | |
| 503 | ZigLLVM_Miss, | |
| 504 | ZigLLVM_Callable, | |
| 505 | ZigLLVM_Mesh, | |
| 506 | ZigLLVM_Amplification, | |
| 507 | ||
| 508 | ZigLLVM_LastEnvironmentType = ZigLLVM_Amplification | |
| 481 | 509 | }; |
| 482 | 510 | |
| 483 | 511 | enum ZigLLVM_ObjectFormatType { |
| 484 | 512 | ZigLLVM_UnknownObjectFormat, |
| 485 | 513 | |
| 486 | 514 | ZigLLVM_COFF, |
| 515 | ZigLLVM_DXContainer, | |
| 487 | 516 | ZigLLVM_ELF, |
| 488 | 517 | ZigLLVM_GOFF, |
| 489 | 518 | ZigLLVM_MachO, |
| 519 | ZigLLVM_SPIRV, | |
| 490 | 520 | ZigLLVM_Wasm, |
| 491 | 521 | ZigLLVM_XCOFF, |
| 492 | 522 | }; |