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 | 47afe4e806eb16dd3d90670adf3ea5f9bca72132 (patch) | |
tree | 0049f8bd1f2dba562b47bd58e82e80d514a98c45 /include/llvm/Support | |
parent | 5938a3e681ab7612f5921c5ccaca5d2e0851c60f (diff) | |
download | external_llvm-47afe4e806eb16dd3d90670adf3ea5f9bca72132.tar.gz external_llvm-47afe4e806eb16dd3d90670adf3ea5f9bca72132.tar.bz2 external_llvm-47afe4e806eb16dd3d90670adf3ea5f9bca72132.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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/CommandLine.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 7f8b10c375..3ee2313b9a 100644 --- a/include/llvm/Support/CommandLine.h +++ b/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; |