about summary refs log tree commit diff homepage
path: root/lib/Module
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-02-14 12:36:05 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2014-02-14 12:36:05 +0000
commit360f372b46478d4f94f8696f4931cd85c20beb88 (patch)
tree51c3bd35819583129a04f8a88ceee9b3b6691404 /lib/Module
parent01fd5aa74c7bbfeeaa10d24e7578a59fa1dab3de (diff)
downloadklee-360f372b46478d4f94f8696f4931cd85c20beb88.tar.gz
Refactor variable name s/RemovedSymbols/SymbolsToRemove/
because "RemovedSymbols" implies that the symbols have already been
removed which is misleading because we don't remove until the end.
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/ModuleUtil.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 7b19639e..7a0e18d2 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -108,13 +108,13 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
 
   // Prune out any defined symbols from the undefined symbols set
   // and other symbols we don't want to treat as an undefined symbol
-  std::vector<std::string> RemovedSymbols;
+  std::vector<std::string> SymbolsToRemove;
   for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
        I != UndefinedSymbols.end(); ++I )
   {
     if (DefinedSymbols.count(*I))
     {
-      RemovedSymbols.push_back(*I);
+      SymbolsToRemove.push_back(*I);
       continue;
     }
 
@@ -123,8 +123,8 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
        (I->compare(0, llvmIntrinsicPrefix.size(), llvmIntrinsicPrefix) == 0) )
     {
       DEBUG_WITH_TYPE("klee_linker", dbgs() << "LLVM intrinsic " << *I <<
-                      " has been removed from undefined symbols"<< "\n");
-      RemovedSymbols.push_back(*I);
+                      " has will be removed from undefined symbols"<< "\n");
+      SymbolsToRemove.push_back(*I);
       continue;
     }
 
@@ -139,13 +139,14 @@ GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
     if (UndefinedSymbols.find(sf->name) == UndefinedSymbols.end())
       continue;
 
-    RemovedSymbols.push_back(sf->name);
+    SymbolsToRemove.push_back(sf->name);
     DEBUG_WITH_TYPE("klee_linker", dbgs() << "KLEE intrinsic " << sf->name <<
-                    " has been removed from undefined symbols"<< "\n");
+                    " has will be removed from undefined symbols"<< "\n");
   }
 
-  for (size_t i = 0, j = RemovedSymbols.size(); i < j; ++i )
-    UndefinedSymbols.erase(RemovedSymbols[i]);
+  // Now remove the symbols from undefined set.
+  for (size_t i = 0, j = SymbolsToRemove.size(); i < j; ++i )
+    UndefinedSymbols.erase(SymbolsToRemove[i]);
 
   DEBUG_WITH_TYPE("klee_linker", dbgs() << "*** Finished computing undefined symbols ***\n");
 }