about summary refs log tree commit diff homepage
path: root/lib/Solver
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2019-07-17 22:42:12 +0200
committerMartinNowack <martin.nowack@gmail.com>2019-10-31 15:35:05 +0000
commite32ae5ae50165593b82cffb6e946532618000933 (patch)
treeb7ad0b2122e21c92a73ea68aeaab51a3937e2a88 /lib/Solver
parent2b78a26d9dbeb7823c5a3487bfa2535fb4b274bf (diff)
downloadklee-e32ae5ae50165593b82cffb6e946532618000933.tar.gz
support compilation against LLVM 9.0
Diffstat (limited to 'lib/Solver')
-rw-r--r--lib/Solver/SolverCmdLine.cpp21
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);
+      }
     }
   }
 }