diff options
author | Dale Johannesen <dalej@apple.com> | 2007-05-22 17:14:46 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-05-22 17:14:46 +0000 |
commit | 82810c8a13bea59b73b7c6dcc83263abaa2247f0 (patch) | |
tree | 364a4b172c117c237e436038e5101b194ca4c3cc /llvm/include/llvm/Support/CommandLine.h | |
parent | 83d7dd419ad5f8b2214a458a2a1589fa05789547 (diff) | |
download | bcm5719-llvm-82810c8a13bea59b73b7c6dcc83263abaa2247f0.tar.gz bcm5719-llvm-82810c8a13bea59b73b7c6dcc83263abaa2247f0.zip |
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.
llvm-svn: 37285
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index c31d79f4e69..08aca8160ac 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/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> |