mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
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
This commit is contained in:
@ -36,6 +36,7 @@ using namespace cl;
|
||||
// Template instantiations and anchors.
|
||||
//
|
||||
TEMPLATE_INSTANTIATION(class basic_parser<bool>);
|
||||
TEMPLATE_INSTANTIATION(class basic_parser<boolOrDefault>);
|
||||
TEMPLATE_INSTANTIATION(class basic_parser<int>);
|
||||
TEMPLATE_INSTANTIATION(class basic_parser<unsigned>);
|
||||
TEMPLATE_INSTANTIATION(class basic_parser<double>);
|
||||
@ -50,6 +51,7 @@ TEMPLATE_INSTANTIATION(class opt<bool>);
|
||||
void Option::anchor() {}
|
||||
void basic_parser_impl::anchor() {}
|
||||
void parser<bool>::anchor() {}
|
||||
void parser<boolOrDefault>::anchor() {}
|
||||
void parser<int>::anchor() {}
|
||||
void parser<unsigned>::anchor() {}
|
||||
void parser<double>::anchor() {}
|
||||
@ -767,6 +769,22 @@ bool parser<bool>::parse(Option &O, const char *ArgName,
|
||||
return false;
|
||||
}
|
||||
|
||||
// parser<boolOrDefault> implementation
|
||||
//
|
||||
bool parser<boolOrDefault>::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<int> implementation
|
||||
//
|
||||
bool parser<int>::parse(Option &O, const char *ArgName,
|
||||
|
Reference in New Issue
Block a user