diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 993d93f4f66..19b5f29fb7f 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -997,7 +997,7 @@ class bits_storage { template<class T> static unsigned Bit(const T &V) { - unsigned BitPos = (unsigned)V; + unsigned BitPos = reinterpret_cast<unsigned>(V); assert(BitPos < sizeof(unsigned) * 8 && "enum exceeds width of bit vector!"); return 1 << BitPos; @@ -1038,7 +1038,7 @@ class bits_storage<DataType, bool> { template<class T> static unsigned Bit(const T &V) { - unsigned BitPos = (unsigned)V; + unsigned BitPos = reinterpret_cast<unsigned>(V); assert(BitPos < sizeof(unsigned) * 8 && "enum exceeds width of bit vector!"); return 1 << BitPos; |

