[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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@257612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2016-01-13 16:32:00 +00:00
parent 4f4a07d66a
commit 2afbf71fdd
2 changed files with 4 additions and 2 deletions

View File

@@ -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;