summaryrefslogtreecommitdiffstats
path: root/llvm
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
commitc220ecfbb92224136ba22b58ab021896b7bcf7ed (patch)
treeaf1fddf7b01b57635692ef4bf41368a2b5bdfdee /llvm
parenta726fc6dbf6337b4d1a7ab1955a39a0933f5f1d8 (diff)
downloadbcm5719-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.h4
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;
OpenPOWER on IntegriCloud