summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-22 02:31:56 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-22 02:31:56 +0000
commit7275e3fb315c5e23957eab06a420aa1ca4098e55 (patch)
tree6a017e4e1c98ad2cf9eda7e9967c9009c5beb8b4 /llvm/include/llvm/Support/CommandLine.h
parentd6312210d12451bbc708c70afe7eac1ad2b6587e (diff)
downloadbcm5719-llvm-7275e3fb315c5e23957eab06a420aa1ca4098e55.tar.gz
bcm5719-llvm-7275e3fb315c5e23957eab06a420aa1ca4098e55.zip
Change some old-style casts to C++ style casts to avoid warnings in XPS
compilation. This change has been waiting in the wings for a long time but since Misha just did a global change, I figured now was the time to commit it. llvm-svn: 21431
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index e0c5c8f8c08..e99d7bbeafd 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -294,9 +294,9 @@ LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); }
//===----------------------------------------------------------------------===//
// Enum valued command line option
//
-#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, (int)ENUMVAL, DESC
-#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, (int)ENUMVAL, DESC
-#define clEnumValEnd ((void*)0)
+#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, int(ENUMVAL), DESC
+#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, int(ENUMVAL), DESC
+#define clEnumValEnd (reinterpret_cast<void*>(0))
// values - For custom data types, allow specifying a group of values together
// as the values that go into the mapping that the option handler uses. Note
@@ -435,7 +435,7 @@ public:
typedef DataType parser_data_type;
// Implement virtual functions needed by generic_parser_base
- unsigned getNumOptions() const { return (unsigned)Values.size(); }
+ unsigned getNumOptions() const { return unsigned(Values.size()); }
const char *getOption(unsigned N) const { return Values[N].first; }
const char *getDescription(unsigned N) const {
return Values[N].second.second;
OpenPOWER on IntegriCloud