aboutsummaryrefslogtreecommitdiff
path: root/std/math/nan.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-08-28 04:28:42 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-08-28 04:28:42 -0400
commitb8ed0cb3741533e036ee05faa165d2f0c49064f4 (patch)
treeb49d168bb11b5fe40748a38cb758ddf6e68d7e04 /std/math/nan.zig
parentd7a539906d2dd49872abb161f3d3364c9641ccd2 (diff)
downloadzig-b8ed0cb3741533e036ee05faa165d2f0c49064f4.tar.gz
zig-b8ed0cb3741533e036ee05faa165d2f0c49064f4.zip
remove workaround for LLVM not respecting "nobuiltin"
now that we depend on LLVM 5.0.0 we can remove the workaround. closes #393
Diffstat (limited to 'std/math/nan.zig')
-rw-r--r--std/math/nan.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/std/math/nan.zig b/std/math/nan.zig
index 3c7b33e8c4..a4899d6b82 100644
--- a/std/math/nan.zig
+++ b/std/math/nan.zig
@@ -1,8 +1,6 @@
const math = @import("index.zig");
-pub const nan = nan_workaround;
-
-pub fn nan_workaround(comptime T: type) -> T {
+pub fn nan(comptime T: type) -> T {
switch (T) {
f32 => @bitCast(f32, math.nan_u32),
f64 => @bitCast(f64, math.nan_u64),
@@ -10,11 +8,9 @@ pub fn nan_workaround(comptime T: type) -> T {
}
}
-pub const snan = snan_workaround;
-
// Note: A signalling nan is identical to a standard right now by may have a different bit
// representation in the future when required.
-pub fn snan_workaround(comptime T: type) -> T {
+pub fn snan(comptime T: type) -> T {
switch (T) {
f32 => @bitCast(f32, math.nan_u32),
f64 => @bitCast(f64, math.nan_u64),