Implement FlagParser using llvm:🆑:generic_parser_base.

This approach is easier and requires less code. With some template foo
the BoolOrDefaultAdapter is not required.

This solutions applies to previous LLVM versions, too.
This commit is contained in:
kai 2015-04-22 07:51:18 +02:00
parent cbb4d6d5b3
commit 4db0123bb7
5 changed files with 127 additions and 96 deletions

View file

@ -111,7 +111,7 @@ disableGCToStack("disable-gc2stack",
cl::desc("Disable promotion of GC allocations to stack memory"),
cl::ZeroOrMore);
static cl::opt<opts::BoolOrDefaultAdapter, false, opts::FlagParser>
static cl::opt<cl::boolOrDefault, false, opts::FlagParser<cl::boolOrDefault> >
enableInlining("inlining",
cl::desc("Enable function inlining (default in -O2 and higher)"),
cl::ZeroOrMore);