summaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-04-05 14:51:36 +0300
committerMartin Storsjö <martin@martin.st>2023-04-12 10:17:21 +0300
commit9c8264f1600bffe00589879ced61042363b5ba13 (patch)
tree5ea9ec78eb5f3a41c70501c29f3235c031b332c1 /libcxxabi
parentea47dcf2c85d0df9e44af4be9490532d6223e2b9 (diff)
downloadllvm-9c8264f1600bffe00589879ced61042363b5ba13.tar.gz
[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.cpp3
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 4683f818b39e..c7ef28a976f8 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 (...)
{