Mercurial > projects > ldc
comparison gen/cl_helpers.h @ 1200:3171f67ad006
Remove reference to llvm::cl::AllowInverse enum value which was removed in
LLVM trunk.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 08 Apr 2009 23:05:30 +0200 |
parents | cc1efa23030a |
children | 40bd4a0d4870 |
comparison
equal
deleted
inserted
replaced
1199:80a326087f59 | 1200:3171f67ad006 |
---|---|
15 class FlagParser : public cl::parser<bool> { | 15 class FlagParser : public cl::parser<bool> { |
16 std::vector<std::pair<std::string, bool> > switches; | 16 std::vector<std::pair<std::string, bool> > switches; |
17 public: | 17 public: |
18 template <class Opt> | 18 template <class Opt> |
19 void initialize(Opt &O) { | 19 void initialize(Opt &O) { |
20 assert(!(O.getMiscFlags() & cl::AllowInverse) | |
21 && "FlagParser doesn't support redundant AllowInverse flag"); | |
22 | |
23 std::string Name = O.ArgStr; | 20 std::string Name = O.ArgStr; |
24 switches.push_back(make_pair("enable-" + Name, true)); | 21 switches.push_back(make_pair("enable-" + Name, true)); |
25 switches.push_back(make_pair("disable-" + Name, false)); | 22 switches.push_back(make_pair("disable-" + Name, false)); |
26 // Replace <foo> with -enable-<foo> | 23 // Replace <foo> with -enable-<foo> |
27 O.ArgStr = switches[0].first.c_str(); | 24 O.ArgStr = switches[0].first.c_str(); |