From 81da02b553b86868637f27b89c6e919c31ed5b51 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 22 May 2007 17:14:46 +0000 Subject: 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 --- lib/Support/CommandLine.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/Support/CommandLine.cpp') diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 2b0798aa77..1f5008a3fa 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -36,6 +36,7 @@ using namespace cl; // Template instantiations and anchors. // TEMPLATE_INSTANTIATION(class basic_parser); +TEMPLATE_INSTANTIATION(class basic_parser); TEMPLATE_INSTANTIATION(class basic_parser); TEMPLATE_INSTANTIATION(class basic_parser); TEMPLATE_INSTANTIATION(class basic_parser); @@ -50,6 +51,7 @@ TEMPLATE_INSTANTIATION(class opt); void Option::anchor() {} void basic_parser_impl::anchor() {} void parser::anchor() {} +void parser::anchor() {} void parser::anchor() {} void parser::anchor() {} void parser::anchor() {} @@ -767,6 +769,22 @@ bool parser::parse(Option &O, const char *ArgName, return false; } +// parser implementation +// +bool parser::parse(Option &O, const char *ArgName, + const std::string &Arg, boolOrDefault &Value) { + if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" || + Arg == "1") { + Value = BOU_TRUE; + } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") { + Value = BOU_FALSE; + } else { + return O.error(": '" + Arg + + "' is invalid value for boolean argument! Try 0 or 1"); + } + return false; +} + // parser implementation // bool parser::parse(Option &O, const char *ArgName, -- cgit v1.2.3-18-g5258