Skip to content

Commit 1cbdbcc

Browse files
committed
update Aro and translate-c to latest
1 parent bf90825 commit 1cbdbcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+47070
-16333
lines changed

lib/compiler/aro/aro.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub const Parser = @import("aro/Parser.zig");
66
pub const Preprocessor = @import("aro/Preprocessor.zig");
77
pub const Source = @import("aro/Source.zig");
88
pub const StringInterner = @import("aro/StringInterner.zig");
9-
pub const target_util = @import("aro/target.zig");
9+
pub const Target = @import("aro/Target.zig");
1010
pub const Tokenizer = @import("aro/Tokenizer.zig");
1111
pub const Toolchain = @import("aro/Toolchain.zig");
1212
pub const Tree = @import("aro/Tree.zig");
@@ -31,11 +31,11 @@ test {
3131
_ = @import("aro/char_info.zig");
3232
_ = @import("aro/Compilation.zig");
3333
_ = @import("aro/Driver/Distro.zig");
34-
_ = @import("aro/Driver/Filesystem.zig");
3534
_ = @import("aro/Driver/GCCVersion.zig");
3635
_ = @import("aro/InitList.zig");
36+
_ = @import("aro/LangOpts.zig");
3737
_ = @import("aro/Preprocessor.zig");
38-
_ = @import("aro/target.zig");
38+
_ = @import("aro/Target.zig");
3939
_ = @import("aro/Tokenizer.zig");
4040
_ = @import("aro/Value.zig");
4141
}

lib/compiler/aro/aro/Attribute.zig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,9 @@ const attributes = struct {
712712
pub const thiscall = struct {};
713713
pub const sysv_abi = struct {};
714714
pub const ms_abi = struct {};
715+
// TODO cannot be combined with weak or selectany
716+
pub const internal_linkage = struct {};
717+
pub const availability = struct {};
715718
};
716719

717720
pub const Tag = std.meta.DeclEnum(attributes);
@@ -776,9 +779,9 @@ pub fn fromString(kind: Kind, namespace: ?[]const u8, name: []const u8) ?Tag {
776779

777780
const tag_and_opts = attribute_names.fromName(normalized) orelse return null;
778781
switch (actual_kind) {
779-
inline else => |tag| {
780-
if (@field(tag_and_opts.properties, @tagName(tag)))
781-
return tag_and_opts.properties.tag;
782+
inline else => |available_kind| {
783+
if (@field(tag_and_opts, @tagName(available_kind)))
784+
return tag_and_opts.tag;
782785
},
783786
}
784787
return null;
@@ -814,7 +817,7 @@ fn applyVariableOrParameterAttributes(p: *Parser, qt: QualType, attr_buf_start:
814817
for (attrs, toks) |attr, tok| switch (attr.tag) {
815818
// zig fmt: off
816819
.alias, .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .weak, .used,
817-
.noinit, .retain, .persistent, .section, .mode, .asm_label, .nullability, .unaligned,
820+
.noinit, .retain, .persistent, .section, .mode, .asm_label, .nullability, .unaligned, .selectany, .internal_linkage,
818821
=> try p.attr_application_buf.append(gpa, attr),
819822
// zig fmt: on
820823
.common => if (nocommon) {
@@ -935,7 +938,7 @@ pub fn applyFunctionAttributes(p: *Parser, qt: QualType, attr_buf_start: usize)
935938
.noreturn, .unused, .used, .warning, .deprecated, .unavailable, .weak, .pure, .leaf,
936939
.@"const", .warn_unused_result, .section, .returns_nonnull, .returns_twice, .@"error",
937940
.externally_visible, .retain, .flatten, .gnu_inline, .alias, .asm_label, .nodiscard,
938-
.reproducible, .unsequenced, .nothrow, .nullability, .unaligned,
941+
.reproducible, .unsequenced, .nothrow, .nullability, .unaligned, .internal_linkage,
939942
=> try p.attr_application_buf.append(gpa, attr),
940943
// zig fmt: on
941944
.hot => if (cold) {

lib/compiler/aro/aro/Attribute/names.zig

Lines changed: 785 additions & 776 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)