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
This commit is contained in:
Reid Spencer 2006-05-12 19:20:55 +00:00
parent 3b6d56cab3
commit 3e41da29fb

View File

@ -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;