LLVM 3.7: Workaround for the FlagParser problem.

Replaces the FlagParser with llvm:🆑:parser<bool>.

If no one objects then this will be the default implementation
starting with LLVM 3.7.

TODO: The help text still has the footnote for the FlagParser options.
This commit is contained in:
kai 2015-03-15 18:09:23 +01:00
parent f691638956
commit c2c00d00a2
2 changed files with 6 additions and 1 deletions

View file

@ -18,6 +18,7 @@
namespace opts {
#if LDC_LLVM_VER < 307
bool FlagParser::parse(cl::Option &O, llvm::StringRef ArgName, llvm::StringRef Arg, bool &Val) {
// Make a std::string out of it to make comparisons easier
// (and avoid repeated conversion)
@ -48,7 +49,7 @@ void FlagParser::getExtraOptionNames(llvm::SmallVectorImpl<const char*> &Names)
Names.push_back(I->first.data());
}
}
#endif
MultiSetter::MultiSetter(bool invert, bool* p, ...) {
this->invert = invert;