diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-05-12 19:20:55 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-05-12 19:20:55 +0000 |
| commit | c220ecfbb92224136ba22b58ab021896b7bcf7ed (patch) | |
| tree | af1fddf7b01b57635692ef4bf41368a2b5bdfdee /llvm | |
| parent | a726fc6dbf6337b4d1a7ab1955a39a0933f5f1d8 (diff) | |
| download | bcm5719-llvm-c220ecfbb92224136ba22b58ab021896b7bcf7ed.tar.gz bcm5719-llvm-c220ecfbb92224136ba22b58ab021896b7bcf7ed.zip | |
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.
llvm-svn: 28263
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; |

