aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-09 00:05:45 +0000
committerChris Lattner <sabre@nondot.org>2010-02-09 00:05:45 +0000
commit47afe4e806eb16dd3d90670adf3ea5f9bca72132 (patch)
tree0049f8bd1f2dba562b47bd58e82e80d514a98c45 /include/llvm/Support/CommandLine.h
parent5938a3e681ab7612f5921c5ccaca5d2e0851c60f (diff)
downloadexternal_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/CommandLine.h')
-rw-r--r--include/llvm/Support/CommandLine.h2
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;