diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-09 00:05:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-09 00:05:45 +0000 |
commit | a460edca798ecdd80facec0bb074865bbd16e06e (patch) | |
tree | 907311e1e3a501983c1be64cf2a766892c007e94 | |
parent | 2a0cd59f8e15a39244feb7a6008b311dd009fcec (diff) | |
download | bcm5719-llvm-a460edca798ecdd80facec0bb074865bbd16e06e.tar.gz bcm5719-llvm-a460edca798ecdd80facec0bb074865bbd16e06e.zip |
enhance bits_storage to work with enums by using a c-style
cast instead of reinterpret_cast, fixing PR6243. Apparently
reinterpret_cast and I aren't getting along today.
llvm-svn: 95622
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 7f8b10c375f..3ee2313b9a3 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -1168,7 +1168,7 @@ class bits_storage<DataType, bool> { template<class T> static unsigned Bit(const T &V) { - unsigned BitPos = reinterpret_cast<unsigned>(V); + unsigned BitPos = (unsigned)V; assert(BitPos < sizeof(unsigned) * CHAR_BIT && "enum exceeds width of bit vector!"); return 1 << BitPos; |