about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2023-07-07 23:55:47 +0100
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2023-07-21 10:00:02 +0100
commit974f140d79a621785b1fe4a0fc7fe321ba1089e2 (patch)
tree8a525ba4336a7606a448c9d2f2ea4883ff3baa47 /lib
parent9cb9fd54846415d0c271cd178d4a9bfe6493ad00 (diff)
downloadklee-974f140d79a621785b1fe4a0fc7fe321ba1089e2.tar.gz
Move some options to the klee namespace and declare them in OptionCategories.h
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/MemoryManager.cpp2
-rw-r--r--lib/Core/StatsTracker.cpp4
-rw-r--r--lib/Core/UserSearcher.cpp11
3 files changed, 7 insertions, 10 deletions
diff --git a/lib/Core/MemoryManager.cpp b/lib/Core/MemoryManager.cpp
index bdb89bb5..a6c3cb25 100644
--- a/lib/Core/MemoryManager.cpp
+++ b/lib/Core/MemoryManager.cpp
@@ -43,9 +43,7 @@ std::uint32_t MemoryManager::quarantine;
 std::size_t MemoryManager::pageSize = sysconf(_SC_PAGE_SIZE);
 
 bool MemoryManager::isDeterministic;
-} // namespace klee
 
-namespace {
 llvm::cl::OptionCategory MemoryCat("Memory management options",
                                    "These options control memory management.");
 
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 305c6da2..6cb14cf3 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -54,7 +54,7 @@ using namespace llvm;
 
 ///
 
-namespace {
+namespace klee {
 cl::OptionCategory
     StatsCat("Statistics options",
              "These options control the statistics generated by KLEE.");
@@ -116,7 +116,7 @@ cl::opt<bool> UseCallPaths("use-call-paths", cl::init(true),
                                     "level statistics (default=true)"),
                            cl::cat(StatsCat));
 
-} // namespace
+} // namespace klee
 
 ///
 
diff --git a/lib/Core/UserSearcher.cpp b/lib/Core/UserSearcher.cpp
index 398c44a9..19ac3718 100644
--- a/lib/Core/UserSearcher.cpp
+++ b/lib/Core/UserSearcher.cpp
@@ -20,7 +20,7 @@
 using namespace llvm;
 using namespace klee;
 
-namespace {
+namespace klee {
 llvm::cl::OptionCategory
     SearchCat("Search options", "These options control the search heuristic.");
 
@@ -79,12 +79,10 @@ cl::opt<std::string> BatchTime(
     cl::init("5s"),
     cl::cat(SearchCat));
 
-} // namespace
-
-void klee::initializeSearchOptions() {
+void initializeSearchOptions() {
   // default values
   if (CoreSearch.empty()) {
-    if (UseMerge){
+    if (UseMerge) {
       CoreSearch.push_back(Searcher::NURS_CovNew);
       klee_warning("--use-merge enabled. Using NURS_CovNew as default searcher.");
     } else {
@@ -94,7 +92,7 @@ void klee::initializeSearchOptions() {
   }
 }
 
-bool klee::userSearcherRequiresMD2U() {
+bool userSearcherRequiresMD2U() {
   return (std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_MD2U) != CoreSearch.end() ||
           std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_CovNew) != CoreSearch.end() ||
           std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_ICnt) != CoreSearch.end() ||
@@ -102,6 +100,7 @@ bool klee::userSearcherRequiresMD2U() {
           std::find(CoreSearch.begin(), CoreSearch.end(), Searcher::NURS_QC) != CoreSearch.end());
 }
 
+} // namespace klee
 
 Searcher *getNewSearcher(Searcher::CoreSearchType type, RNG &rng, PTree &processTree) {
   Searcher *searcher = nullptr;