[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user