From: Evan Cheng Date: Sun, 4 Oct 2009 05:25:42 +0000 (+0000) Subject: Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOcc... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d113c6b601c778a85443cb4b4c80452e92c1fb8e;p=oota-llvm.git Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOccurrences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83273 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 4fcca1d431e..dc73979bb09 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -67,7 +67,7 @@ void MarkOptionsChanged(); // Flags permitted to be passed to command line arguments // -enum NumOccurrences { // Flags for the number of occurrences allowed +enum NumOccurrencesFlag { // Flags for the number of occurrences allowed Optional = 0x01, // Zero or One occurrence ZeroOrMore = 0x02, // Zero or more occurrences allowed Required = 0x03, // One occurrence required @@ -162,8 +162,8 @@ public: const char *HelpStr; // The descriptive text message for --help const char *ValueStr; // String describing what the value of this option is - inline enum NumOccurrences getNumOccurrencesFlag() const { - return static_cast(Flags & OccurrencesMask); + inline enum NumOccurrencesFlag getNumOccurrencesFlag() const { + return static_cast(Flags & OccurrencesMask); } inline enum ValueExpected getValueExpectedFlag() const { int VE = Flags & ValueMask; @@ -197,7 +197,7 @@ public: Flags |= Flag; } - void setNumOccurrencesFlag(enum NumOccurrences Val) { + void setNumOccurrencesFlag(enum NumOccurrencesFlag Val) { setFlag(Val, OccurrencesMask); } void setValueExpectedFlag(enum ValueExpected Val) { setFlag(Val, ValueMask); } @@ -720,8 +720,10 @@ template<> struct applicator { static void opt(const char *Str, Opt &O) { O.setArgStr(Str); } }; -template<> struct applicator { - static void opt(NumOccurrences NO, Option &O) { O.setNumOccurrencesFlag(NO); } +template<> struct applicator { + static void opt(NumOccurrencesFlag NO, Option &O) { + O.setNumOccurrencesFlag(NO); + } }; template<> struct applicator { static void opt(ValueExpected VE, Option &O) { O.setValueExpectedFlag(VE); }