summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/language.support/support.limits
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2016-01-13 16:32:00 +0000
committerDan Gohman <dan433584@gmail.com>2016-01-13 16:32:00 +0000
commit4a9e173e08bff6887ae793ef52e8313611ef0abb (patch)
tree420c3447050d7b05710c3d5af256c26936191811 /libcxx/test/std/language.support/support.limits
parentbf83f9aaf238a9f77d4219ecdc00d7fa2c6af539 (diff)
downloadbcm5719-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/test/std/language.support/support.limits')
-rw-r--r--libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
index af93e78c0e9..23811fada5e 100644
--- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
@@ -13,7 +13,8 @@
#include <limits>
-#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
+ defined(__wasm__)
static const bool integral_types_trap = true;
#else
static const bool integral_types_trap = false;
OpenPOWER on IntegriCloud