summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-23 00:44:37 +0000
committerChris Lattner <sabre@nondot.org>2002-07-23 00:44:37 +0000
commitae1257a77b108d1c0202547a06473693ea4492c6 (patch)
tree5d580571c46998088f11eddfbc93433b5e7bd0c3 /include
parent5eb6b70b06c535e84cd00e8e58beaab7972a317e (diff)
downloadllvm-ae1257a77b108d1c0202547a06473693ea4492c6.tar.gz
llvm-ae1257a77b108d1c0202547a06473693ea4492c6.tar.bz2
llvm-ae1257a77b108d1c0202547a06473693ea4492c6.tar.xz
Change to avoid bug in GCC 3.0.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/Support/CommandLine.h7
-rw-r--r--include/llvm/Support/CommandLine.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/include/Support/CommandLine.h b/include/Support/CommandLine.h
index e8a4250a89..9e02a6cf41 100644
--- a/include/Support/CommandLine.h
+++ b/include/Support/CommandLine.h
@@ -173,6 +173,7 @@ public:
// occurances of -ArgStr on the command line.
//
void addArgument(const char *ArgStr);
+ void removeArgument(const char *ArgStr);
// Return the width of the option tag for printing...
virtual unsigned getOptionWidth() const = 0;
@@ -255,8 +256,8 @@ LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); }
//===----------------------------------------------------------------------===//
// Enum valued command line option
//
-#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, ENUMVAL, DESC
-#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, ENUMVAL, DESC
+#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, (int)ENUMVAL, DESC
+#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, (int)ENUMVAL, DESC
// 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
@@ -278,7 +279,7 @@ public:
// Process the varargs portion of the values...
while (const char *EnumName = va_arg(ValueArgs, const char *)) {
- DataType EnumVal = va_arg(ValueArgs, DataType);
+ DataType EnumVal = (DataType)va_arg(ValueArgs, int);
const char *EnumDesc = va_arg(ValueArgs, const char *);
Values.push_back(std::make_pair(EnumName, // Add value to value map
std::make_pair(EnumVal, EnumDesc)));
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index e8a4250a89..9e02a6cf41 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -173,6 +173,7 @@ public:
// occurances of -ArgStr on the command line.
//
void addArgument(const char *ArgStr);
+ void removeArgument(const char *ArgStr);
// Return the width of the option tag for printing...
virtual unsigned getOptionWidth() const = 0;
@@ -255,8 +256,8 @@ LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); }
//===----------------------------------------------------------------------===//
// Enum valued command line option
//
-#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, ENUMVAL, DESC
-#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, ENUMVAL, DESC
+#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, (int)ENUMVAL, DESC
+#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, (int)ENUMVAL, DESC
// 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
@@ -278,7 +279,7 @@ public:
// Process the varargs portion of the values...
while (const char *EnumName = va_arg(ValueArgs, const char *)) {
- DataType EnumVal = va_arg(ValueArgs, DataType);
+ DataType EnumVal = (DataType)va_arg(ValueArgs, int);
const char *EnumDesc = va_arg(ValueArgs, const char *);
Values.push_back(std::make_pair(EnumName, // Add value to value map
std::make_pair(EnumVal, EnumDesc)));