diff options
-rw-r--r-- | include/klee/ExecutionState.h | 4 | ||||
-rw-r--r-- | lib/Core/ExecutionState.cpp | 9 | ||||
-rw-r--r-- | lib/Core/Executor.cpp | 13 |
3 files changed, 2 insertions, 24 deletions
diff --git a/include/klee/ExecutionState.h b/include/klee/ExecutionState.h index 711cf1b3..066ba539 100644 --- a/include/klee/ExecutionState.h +++ b/include/klee/ExecutionState.h @@ -72,8 +72,6 @@ private: // unsupported, use copy constructor ExecutionState &operator=(const ExecutionState &); - std::map<std::string, std::string> fnAliases; - public: // Execution - Control Flow specific @@ -143,8 +141,6 @@ public: /// @brief Set of used array names for this state. Used to avoid collisions. std::set<std::string> arrayNames; - std::string getFnAlias(std::string fn); - // The objects handling the klee_open_merge calls this state ran through std::vector<ref<MergeHandler> > openMergeStack; diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp index 48154383..3bce274c 100644 --- a/lib/Core/ExecutionState.cpp +++ b/lib/Core/ExecutionState.cpp @@ -102,7 +102,6 @@ ExecutionState::~ExecutionState() { } ExecutionState::ExecutionState(const ExecutionState& state): - fnAliases(state.fnAliases), pc(state.pc), prevPC(state.prevPC), stack(state.stack), @@ -164,14 +163,6 @@ void ExecutionState::addSymbolic(const MemoryObject *mo, const Array *array) { mo->refCount++; symbolics.push_back(std::make_pair(mo, array)); } -/// - -std::string ExecutionState::getFnAlias(std::string fn) { - std::map < std::string, std::string >::iterator it = fnAliases.find(fn); - if (it != fnAliases.end()) - return it->second; - else return ""; -} /**/ diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 05e20f65..330665c0 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -1575,7 +1575,7 @@ void Executor::transferToBasicBlock(BasicBlock *dst, BasicBlock *src, } } -/// Compute the true target of a function call, resolving LLVM and KLEE aliases +/// Compute the true target of a function call, resolving LLVM aliases /// and bitcasts. Function* Executor::getTargetFunction(Value *calledVal, ExecutionState &state) { SmallPtrSet<const GlobalValue*, 3> Visited; @@ -1588,16 +1588,7 @@ Function* Executor::getTargetFunction(Value *calledVal, ExecutionState &state) { if (GlobalValue *gv = dyn_cast<GlobalValue>(c)) { if (!Visited.insert(gv).second) return 0; - std::string alias = state.getFnAlias(gv->getName()); - if (alias != "") { - GlobalValue *old_gv = gv; - gv = kmodule->module->getNamedValue(alias); - if (!gv) { - klee_error("Function %s(), alias for %s not found!\n", alias.c_str(), - old_gv->getName().str().c_str()); - } - } - + if (Function *f = dyn_cast<Function>(gv)) return f; else if (GlobalAlias *ga = dyn_cast<GlobalAlias>(gv)) |