about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2019-03-15 12:52:47 +0000
committerMartinNowack <martin.nowack@gmail.com>2019-03-15 22:53:39 +0000
commit43088bcc6323c3a3ef394ac909ed3cc0a909d249 (patch)
tree44906b4b0545b68d1641bc81cc6dd8c7c0b8d791
parent9896c3e7168aea4890de026e6c9a050e55a05784 (diff)
downloadklee-43088bcc6323c3a3ef394ac909ed3cc0a909d249.tar.gz
Categorized the options in SpecialFunctionHandler.cpp
-rw-r--r--include/klee/OptionCategories.h1
-rw-r--r--lib/Core/SpecialFunctionHandler.cpp44
2 files changed, 22 insertions, 23 deletions
diff --git a/include/klee/OptionCategories.h b/include/klee/OptionCategories.h
index 26cfc694..569ddcb3 100644
--- a/include/klee/OptionCategories.h
+++ b/include/klee/OptionCategories.h
@@ -23,6 +23,7 @@ namespace klee {
   extern llvm::cl::OptionCategory SeedingCat;
   extern llvm::cl::OptionCategory SolvingCat;
   extern llvm::cl::OptionCategory TerminationCat;
+  extern llvm::cl::OptionCategory TestGenCat;
 }
 
 #endif
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp
index 6f887a43..384481f8 100644
--- a/lib/Core/SpecialFunctionHandler.cpp
+++ b/lib/Core/SpecialFunctionHandler.cpp
@@ -7,26 +7,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Memory.h"
 #include "SpecialFunctionHandler.h"
+
+#include "Executor.h"
+#include "Memory.h"
+#include "MemoryManager.h"
 #include "TimingSolver.h"
 #include "klee/MergeHandler.h"
 
 #include "klee/ExecutionState.h"
-
 #include "klee/Internal/Module/KInstruction.h"
 #include "klee/Internal/Module/KModule.h"
 #include "klee/Internal/Support/Debug.h"
 #include "klee/Internal/Support/ErrorHandling.h"
-
-#include "Executor.h"
-#include "MemoryManager.h"
-
+#include "klee/OptionCategories.h"
 #include "klee/SolverCmdLine.h"
 
-#include "llvm/IR/Module.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/Module.h"
 
 #include <errno.h>
 #include <sstream>
@@ -35,28 +34,27 @@ using namespace llvm;
 using namespace klee;
 
 namespace {
-  cl::opt<bool>
-  ReadablePosix("readable-posix-inputs",
-            cl::init(false),
-            cl::desc("Prefer creation of POSIX inputs (command-line arguments, files, etc.) with human readable bytes. "
-                     "Note: option is expensive when creating lots of tests (default=false)"));
-
-  cl::opt<bool>
-  SilentKleeAssume("silent-klee-assume",
-                   cl::init(false),
-                   cl::desc("Silently terminate paths with an infeasible "
-                            "condition given to klee_assume() rather than "
-                            "emitting an error (default=false)"));
-}
-
+cl::opt<bool>
+    ReadablePosix("readable-posix-inputs", cl::init(false),
+                  cl::desc("Prefer creation of POSIX inputs (command-line "
+                           "arguments, files, etc.) with human readable bytes. "
+                           "Note: option is expensive when creating lots of "
+                           "tests (default=false)"),
+                  cl::cat(TestGenCat));
+
+cl::opt<bool>
+    SilentKleeAssume("silent-klee-assume", cl::init(false),
+                     cl::desc("Silently terminate paths with an infeasible "
+                              "condition given to klee_assume() rather than "
+                              "emitting an error (default=false)"),
+                     cl::cat(TerminationCat));
+} // namespace
 
 /// \todo Almost all of the demands in this file should be replaced
 /// with terminateState calls.
 
 ///
 
-
-
 // FIXME: We are more or less committed to requiring an intrinsic
 // library these days. We can move some of this stuff there,
 // especially things like realloc which have complicated semantics