summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-05-12 19:20:55 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-05-12 19:20:55 +0000
commit3e41da29fb74a4f2a43a1539b612b2fb11bef375 (patch)
tree0dc20b66a9ec42a334608078e7909ca3fef24959 /include/llvm/Support/CommandLine.h
parent3b6d56cab3dde20699d862fbd859bcb4ea4ed16e (diff)
downloadllvm-3e41da29fb74a4f2a43a1539b612b2fb11bef375.tar.gz
llvm-3e41da29fb74a4f2a43a1539b612b2fb11bef375.tar.bz2
llvm-3e41da29fb74a4f2a43a1539b612b2fb11bef375.tar.xz
Don't use old-style casts. This prevents compiler warnings when CommandLine.h
is used in projects that have stricter warning control than LLVM. This also helps us find casts more easily if we ever need to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28263 91177308-0d34-0410-b5e6-96231b3b80d8
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;