diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-01-10 14:06:29 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-01-10 14:06:29 +0000 |
| commit | 8b47610c32236595624f3f41fc9b4bba4e39ec49 (patch) | |
| tree | 5776206ee573a6945b981847acb268c3304bc20e | |
| parent | 2a23e55803e4cff11e1ee09d7c6becb180cb0f05 (diff) | |
| download | bcm5719-llvm-8b47610c32236595624f3f41fc9b4bba4e39ec49.tar.gz bcm5719-llvm-8b47610c32236595624f3f41fc9b4bba4e39ec49.zip | |
[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.
llvm-svn: 257288
| -rw-r--r-- | llvm/include/llvm/ADT/PointerEmbeddedInt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h index 9386c42350b..5bd14c6173a 100644 --- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h +++ b/llvm/include/llvm/ADT/PointerEmbeddedInt.h @@ -30,13 +30,13 @@ template <typename IntT, int Bits = sizeof(IntT) * CHAR_BIT> 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<uintptr_t>(-1) << Bits |

