aboutsummaryrefslogtreecommitdiff
path: root/lib/std/builtin.zig
diff options
context:
space:
mode:
authorTadeo Kondrak <me@tadeo.ca>2020-10-17 18:04:53 -0600
committerVeikka Tuominen <git@vexu.eu>2020-11-19 18:59:21 +0200
commit25ec2dbc1e2302d1138749262b588d3e438fcd55 (patch)
tree34187fbd88b2e9b046f50cea93f482a191bc3248 /lib/std/builtin.zig
parent2b7781d82ad8d2234b89257676670957e005f214 (diff)
downloadzig-25ec2dbc1e2302d1138749262b588d3e438fcd55.tar.gz
zig-25ec2dbc1e2302d1138749262b588d3e438fcd55.zip
Add builtin.Signedness, use it instead of is_signed
Diffstat (limited to 'lib/std/builtin.zig')
-rw-r--r--lib/std/builtin.zig9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 19d3337138..20195bf5a5 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -209,7 +209,7 @@ pub const TypeInfo = union(enum) {
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
pub const Int = struct {
- is_signed: bool,
+ signedness: Signedness,
bits: comptime_int,
};
@@ -440,6 +440,13 @@ pub const Endian = enum {
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
+pub const Signedness = enum {
+ signed,
+ unsigned,
+};
+
+/// This data structure is used by the Zig language code generation and
+/// therefore must be kept in sync with the compiler implementation.
pub const OutputMode = enum {
Exe,
Lib,