aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-05-22 17:14:46 +0000
committerDale Johannesen <dalej@apple.com>2007-05-22 17:14:46 +0000
commit81da02b553b86868637f27b89c6e919c31ed5b51 (patch)
treea5026c04264ed6e37a5d7da17c8e0b9d4935d8d6 /include/llvm/Support
parent9621921acb971aa5c30a4800dd99538361c45eba (diff)
downloadexternal_llvm-81da02b553b86868637f27b89c6e919c31ed5b51.zip
external_llvm-81da02b553b86868637f27b89c6e919c31ed5b51.tar.gz
external_llvm-81da02b553b86868637f27b89c6e919c31ed5b51.tar.bz2
Make tail merging the default, except on powerPC. There was no prior art
for a target-dependent default with a command-line override; this way should be generally usable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/CommandLine.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index c31d79f..08aca81 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -544,6 +544,28 @@ public:
EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<bool>);
+//--------------------------------------------------
+// parser<boolOrDefault>
+enum boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE };
+template<>
+class parser<boolOrDefault> : public basic_parser<boolOrDefault> {
+public:
+ // parse - Return true on error.
+ bool parse(Option &O, const char *ArgName, const std::string &Arg,
+ boolOrDefault &Val);
+
+ enum ValueExpected getValueExpectedFlagDefault() const {
+ return ValueOptional;
+ }
+
+ // getValueName - Do not print =<value> at all.
+ virtual const char *getValueName() const { return 0; }
+
+ // An out-of-line virtual method to provide a 'home' for this class.
+ virtual void anchor();
+};
+
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<boolOrDefault>);
//--------------------------------------------------
// parser<int>