summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2019-04-15 14:43:50 +0000
committerIlya Biryukov <ibiryukov@google.com>2019-04-15 14:43:50 +0000
commit70921d4a86e0cbe4978e4306984e9923411dfff2 (patch)
treefc5a8ea06c11bd6e43ca3a078dab15ad1547306f /llvm/include/llvm/Support/CommandLine.h
parentbb6cd8254c2497e744a6774174a6c11636ba9d25 (diff)
downloadbcm5719-llvm-70921d4a86e0cbe4978e4306984e9923411dfff2.tar.gz
bcm5719-llvm-70921d4a86e0cbe4978e4306984e9923411dfff2.zip
Revert r358337: "[CommandLineParser] Add DefaultOption flag"
The change causes test failures under asan. Reverting to unbreak our integrate. llvm-svn: 358414
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 1fb95957244..cb85534ad8e 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -175,10 +175,7 @@ enum MiscFlags { // Miscellaneous flags to adjust argument
// If this is enabled, multiple letter options are allowed to bunch together
// with only a single hyphen for the whole group. This allows emulation
// of the behavior that ls uses for example: ls -la === ls -l -a
- Grouping = 0x08,
-
- // Default option
- DefaultOption = 0x10
+ Grouping = 0x08
};
//===----------------------------------------------------------------------===//
@@ -273,7 +270,7 @@ class Option {
unsigned Value : 2;
unsigned HiddenFlag : 2; // enum OptionHidden
unsigned Formatting : 2; // enum FormattingFlags
- unsigned Misc : 5;
+ unsigned Misc : 4;
unsigned Position = 0; // Position of last occurrence of the option
unsigned AdditionalVals = 0; // Greater than 0 for multi-valued option.
@@ -309,7 +306,6 @@ public:
bool hasArgStr() const { return !ArgStr.empty(); }
bool isPositional() const { return getFormattingFlag() == cl::Positional; }
bool isSink() const { return getMiscFlags() & cl::Sink; }
- bool isDefaultOption() const { return getMiscFlags() & cl::DefaultOption; }
bool isConsumeAfter() const {
return getNumOccurrencesFlag() == cl::ConsumeAfter;
@@ -386,7 +382,7 @@ public:
}
inline int getNumOccurrences() const { return NumOccurrences; }
- void reset();
+ inline void reset() { NumOccurrences = 0; }
};
//===----------------------------------------------------------------------===//
@@ -1736,10 +1732,7 @@ class alias : public Option {
error("cl::alias must have argument name specified!");
if (!AliasFor)
error("cl::alias must have an cl::aliasopt(option) specified!");
- if (!Subs.empty())
- error("cl::alias must not have cl::sub(), aliased option's cl::sub() will be used!");
Subs = AliasFor->Subs;
- Category = AliasFor->Category;
addArgument();
}
OpenPOWER on IntegriCloud