diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 7f8b10c375f..3ee2313b9a3 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1168,7 +1168,7 @@ class bits_storage { template static unsigned Bit(const T &V) { - unsigned BitPos = reinterpret_cast(V); + unsigned BitPos = (unsigned)V; assert(BitPos < sizeof(unsigned) * CHAR_BIT && "enum exceeds width of bit vector!"); return 1 << BitPos;