From 3e41da29fb74a4f2a43a1539b612b2fb11bef375 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 12 May 2006 19:20:55 +0000 Subject: 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 --- include/llvm/Support/CommandLine.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/llvm/Support/CommandLine.h') 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 static unsigned Bit(const T &V) { - unsigned BitPos = (unsigned)V; + unsigned BitPos = reinterpret_cast(V); assert(BitPos < sizeof(unsigned) * 8 && "enum exceeds width of bit vector!"); return 1 << BitPos; @@ -1038,7 +1038,7 @@ class bits_storage { template static unsigned Bit(const T &V) { - unsigned BitPos = (unsigned)V; + unsigned BitPos = reinterpret_cast(V); assert(BitPos < sizeof(unsigned) * 8 && "enum exceeds width of bit vector!"); return 1 << BitPos; -- cgit v1.2.3