diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2019-07-17 22:42:12 +0200 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-10-31 15:35:05 +0000 |
commit | e32ae5ae50165593b82cffb6e946532618000933 (patch) | |
tree | b7ad0b2122e21c92a73ea68aeaab51a3937e2a88 /lib/Solver | |
parent | 2b78a26d9dbeb7823c5a3487bfa2535fb4b274bf (diff) | |
download | klee-e32ae5ae50165593b82cffb6e946532618000933.tar.gz |
support compilation against LLVM 9.0
Diffstat (limited to 'lib/Solver')
-rw-r--r-- | lib/Solver/SolverCmdLine.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/Solver/SolverCmdLine.cpp b/lib/Solver/SolverCmdLine.cpp index 87b66317..6cc13b17 100644 --- a/lib/Solver/SolverCmdLine.cpp +++ b/lib/Solver/SolverCmdLine.cpp @@ -118,18 +118,15 @@ void KCommandLine::HideOptions(llvm::cl::OptionCategory &Category) { StringMap<cl::Option *> &map = cl::getRegisteredOptions(); for (auto &elem : map) { - if (elem.second->Category == &Category) { - elem.second->setHiddenFlag(cl::Hidden); - } - } -} - -void KCommandLine::HideUnrelatedOptions(cl::OptionCategory &Category) { - StringMap<cl::Option *> &map = cl::getRegisteredOptions(); - for (StringMap<cl::Option *>::iterator i = map.begin(), e = map.end(); i != e; - i++) { - if (i->second->Category != &Category) { - i->second->setHiddenFlag(cl::Hidden); +#if LLVM_VERSION_CODE >= LLVM_VERSION(9, 0) + for (auto &cat : elem.second->Categories) { +#else + { + auto &cat = elem.second->Category; +#endif + if (cat == &Category) { + elem.second->setHiddenFlag(cl::Hidden); + } } } } |