From: Benjamin Kramer Date: Sun, 10 Jan 2016 14:27:26 +0000 (+0000) Subject: [ADT] Another stab at fixing the PointerEmbeddedInt build for MSVC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b3cad3ca309da7f5168c05fa40adc813854f0afa;p=oota-llvm.git [ADT] Another stab at fixing the PointerEmbeddedInt build for MSVC. MSVC18 seems to have other problems here, just hardcode uintptr_t. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257289 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/PointerEmbeddedInt.h b/include/llvm/ADT/PointerEmbeddedInt.h index 5bd14c6173a..8781d1803ac 100644 --- a/include/llvm/ADT/PointerEmbeddedInt.h +++ b/include/llvm/ADT/PointerEmbeddedInt.h @@ -30,13 +30,13 @@ template class PointerEmbeddedInt { uintptr_t Value; - static_assert(Bits < sizeof(PointerEmbeddedInt::Value) * CHAR_BIT, + static_assert(Bits < sizeof(uintptr_t) * CHAR_BIT, "Cannot embed more bits than we have in a pointer!"); enum : uintptr_t { // We shift as many zeros into the value as we can while preserving the // number of bits desired for the integer. - Shift = sizeof(PointerEmbeddedInt::Value) * CHAR_BIT - Bits, + Shift = sizeof(uintptr_t) * CHAR_BIT - Bits, // We also want to be able to mask out the preserved bits for asserts. Mask = static_cast(-1) << Bits