From 7eac64ccedd13b9f0512e4e49a07a34ab946704b Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 10 Jan 2016 14:06:29 +0000 Subject: [PATCH] [ADT] Unbreak PointerEmbeddedInt build with MSVC. MSVC seems to have problems looking up Value inside of the template. Not really sure whether that's a bug there or Clang and GCC being too permissive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257288 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/PointerEmbeddedInt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/PointerEmbeddedInt.h b/include/llvm/ADT/PointerEmbeddedInt.h index 9386c42350b..5bd14c6173a 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(Value) * CHAR_BIT, + static_assert(Bits < sizeof(PointerEmbeddedInt::Value) * 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(Value) * CHAR_BIT - Bits, + Shift = sizeof(PointerEmbeddedInt::Value) * CHAR_BIT - Bits, // We also want to be able to mask out the preserved bits for asserts. Mask = static_cast(-1) << Bits -- 2.11.0