Changes in directory llvm/include/llvm/Support:

CommandLine.h updated: 1.52 -> 1.53
---
Log message:

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.


---
Diffs of the changes:  (+2 -2)

 CommandLine.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Support/CommandLine.h
diff -u llvm/include/llvm/Support/CommandLine.h:1.52 
llvm/include/llvm/Support/CommandLine.h:1.53
--- llvm/include/llvm/Support/CommandLine.h:1.52        Mon Oct 24 00:03:46 2005
+++ llvm/include/llvm/Support/CommandLine.h     Fri May 12 14:20:55 2006
@@ -997,7 +997,7 @@
   
   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 @@
   
   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;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to