diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-02 19:43:38 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-02 19:43:38 -0700 |
| commit | d631bfe0601bbe3b9bfd1ce2c2d0cad90997221f (patch) | |
| tree | ad0401bac06da868df738f6e4e503fe74b89c5d6 /tools | |
| parent | c75226d03356f33df698d5e5a74173476bd47240 (diff) | |
| download | zig-d631bfe0601bbe3b9bfd1ce2c2d0cad90997221f.tar.gz zig-d631bfe0601bbe3b9bfd1ce2c2d0cad90997221f.zip | |
update clang CLI options to LLVM 15
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/update_clang_options.zig | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index 2c13f1082b..32bb436ca3 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -489,6 +489,7 @@ const cpu_targets = struct { pub const arm = std.Target.arm; pub const avr = std.Target.avr; pub const bpf = std.Target.bpf; + pub const csky = std.Target.csky; pub const hexagon = std.Target.hexagon; pub const mips = std.Target.mips; pub const msp430 = std.Target.msp430; @@ -497,7 +498,7 @@ const cpu_targets = struct { pub const riscv = std.Target.riscv; pub const sparc = std.Target.sparc; pub const spirv = std.Target.spirv; - pub const systemz = std.Target.systemz; + pub const s390x = std.Target.s390x; pub const ve = std.Target.ve; pub const wasm = std.Target.wasm; pub const x86 = std.Target.x86; @@ -630,7 +631,7 @@ pub fn main() anyerror!void { std.process.exit(1); } } - const syntax = objSyntax(obj); + const syntax = objSyntax(obj) orelse continue; if (std.mem.eql(u8, name, "MT") and syntax == .flag) { // `-MT foo` is ambiguous because there is also an -MT flag @@ -647,9 +648,9 @@ pub fn main() anyerror!void { \\ .name = "{s}", \\ .syntax = {s}, \\ .zig_equivalent = .{s}, - \\ .pd1 = {s}, - \\ .pd2 = {s}, - \\ .psl = {s}, + \\ .pd1 = {any}, + \\ .pd2 = {any}, + \\ .psl = {any}, \\}}, \\ , .{ name, final_syntax, ident, pd1, pd2, pslash }); @@ -677,9 +678,9 @@ pub fn main() anyerror!void { \\ .name = "{s}", \\ .syntax = {s}, \\ .zig_equivalent = .other, - \\ .pd1 = {s}, - \\ .pd2 = {s}, - \\ .psl = {s}, + \\ .pd1 = {any}, + \\ .pd2 = {any}, + \\ .psl = {any}, \\}}, \\ , .{ name, syntax, pd1, pd2, pslash }); @@ -736,7 +737,7 @@ const Syntax = union(enum) { } }; -fn objSyntax(obj: *json.ObjectMap) Syntax { +fn objSyntax(obj: *json.ObjectMap) ?Syntax { const num_args = @intCast(u8, obj.get("NumArgs").?.Integer); for (obj.get("!superclasses").?.Array.items) |superclass_json| { const superclass = superclass_json.String; @@ -754,6 +755,10 @@ fn objSyntax(obj: *json.ObjectMap) Syntax { return .joined_or_separate; } else if (std.mem.eql(u8, superclass, "CLCompileJoinedOrSeparate")) { return .joined_or_separate; + } else if (std.mem.eql(u8, superclass, "DXCJoinedOrSeparate")) { + return .joined_or_separate; + } else if (std.mem.eql(u8, superclass, "CLDXCJoinedOrSeparate")) { + return .joined_or_separate; } else if (std.mem.eql(u8, superclass, "Flag")) { return .flag; } else if (std.mem.eql(u8, superclass, "CLFlag")) { @@ -787,7 +792,8 @@ fn objSyntax(obj: *json.ObjectMap) Syntax { for (obj.get("!superclasses").?.Array.items) |superclass_json| { std.debug.print(" {s}\n", .{superclass_json.String}); } - std.process.exit(1); + //std.process.exit(1); + return null; } fn syntaxMatchesWithEql(syntax: Syntax) bool { @@ -810,8 +816,8 @@ fn objectLessThan(context: void, a: *json.ObjectMap, b: *json.ObjectMap) bool { _ = context; // Priority is determined by exact matches first, followed by prefix matches in descending // length, with key as a final tiebreaker. - const a_syntax = objSyntax(a); - const b_syntax = objSyntax(b); + const a_syntax = objSyntax(a) orelse return false; + const b_syntax = objSyntax(b) orelse return true; const a_match_with_eql = syntaxMatchesWithEql(a_syntax); const b_match_with_eql = syntaxMatchesWithEql(b_syntax); |
