diff options
| author | Dan Gohman <dan433584@gmail.com> | 2016-01-13 16:32:00 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2016-01-13 16:32:00 +0000 |
| commit | 4a9e173e08bff6887ae793ef52e8313611ef0abb (patch) | |
| tree | 420c3447050d7b05710c3d5af256c26936191811 /libcxx/include | |
| parent | bf83f9aaf238a9f77d4219ecdc00d7fa2c6af539 (diff) | |
| download | bcm5719-llvm-4a9e173e08bff6887ae793ef52e8313611ef0abb.tar.gz bcm5719-llvm-4a9e173e08bff6887ae793ef52e8313611ef0abb.zip | |
[WebAssembly] Set std::numeric_limits's traps field for WebAssembly.
WebAssembly's integer division instruction traps on division by zero; set the
traps field of integral std::numeric_limits to true.
llvm-svn: 257612
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/limits | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/limits b/libcxx/include/limits index ce967ea1b23..80a1be40fe4 100644 --- a/libcxx/include/limits +++ b/libcxx/include/limits @@ -237,7 +237,8 @@ protected: static _LIBCPP_CONSTEXPR const bool is_bounded = true; static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value; -#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) +#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ + defined(__wasm__) static _LIBCPP_CONSTEXPR const bool traps = true; #else static _LIBCPP_CONSTEXPR const bool traps = false; |

