commit d6b430b520103fb6691b2c18ae06c2f2a360e806 (tree)
parent 885d6968958e1cad4862ed1b6f1ea0b2d84c3845
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 30 Jan 2023 18:53:14 -0700
std.Target: remove workaround
This was working around a stage1 compiler bug.
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/std/target.zig b/lib/std/target.zig
@@ -697,9 +697,6 @@ pub const Target = struct {
pub const ShiftInt = std.math.Log2Int(usize);
pub const empty = Set{ .ints = [1]usize{0} ** usize_count };
- pub fn empty_workaround() Set {
- return Set{ .ints = [1]usize{0} ** usize_count };
- }
pub fn isEmpty(set: Set) bool {
return for (set.ints) |x| {
@@ -782,7 +779,7 @@ pub const Target = struct {
return struct {
/// Populates only the feature bits specified.
pub fn featureSet(features: []const F) Set {
- var x = Set.empty_workaround(); // TODO remove empty_workaround
+ var x = Set.empty;
for (features) |feature| {
x.addFeature(@enumToInt(feature));
}