diff options
author | Martin Storsjö <martin@martin.st> | 2023-04-05 14:51:36 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2023-04-12 10:17:21 +0300 |
commit | 9c8264f1600bffe00589879ced61042363b5ba13 (patch) | |
tree | 5ea9ec78eb5f3a41c70501c29f3235c031b332c1 /libcxxabi | |
parent | ea47dcf2c85d0df9e44af4be9490532d6223e2b9 (diff) | |
download | llvm-9c8264f1600bffe00589879ced61042363b5ba13.zip llvm-9c8264f1600bffe00589879ced61042363b5ba13.tar.gz llvm-9c8264f1600bffe00589879ced61042363b5ba13.tar.bz2 |
[libcxxabi] [test] Don't cast a pointer to long, fixing the test on Windows
Use uintptr_t instead. On Windows, long is 32 bit even on 64 bit
architectures.
Differential Revision: https://reviews.llvm.org/D147639
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/test/catch_ptr_02.pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxxabi/test/catch_ptr_02.pass.cpp b/libcxxabi/test/catch_ptr_02.pass.cpp index 4683f81..c7ef28a 100644 --- a/libcxxabi/test/catch_ptr_02.pass.cpp +++ b/libcxxabi/test/catch_ptr_02.pass.cpp @@ -17,6 +17,7 @@ // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.9 #include <cassert> +#include <stdint.h> #if __cplusplus < 201103L #define DISABLE_NULLPTR_TESTS @@ -136,7 +137,7 @@ void test7 () assert(false); } catch (base2 *p) { - assert ((unsigned long)p == 12+sizeof(base1)); + assert ((uintptr_t)p == 12+sizeof(base1)); } catch (...) { |