summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/CommandLine.h')
-rw-r--r--include/llvm/Support/CommandLine.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 993d93f4f6..19b5f29fb7 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/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;