diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2019-01-15 19:12:48 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-05-30 09:45:21 +0100 |
commit | 31f965a01fbf7fd6e8590395de2f59d1b224607c (patch) | |
tree | 63386cb97532b69bf3d8528d7a2e764d89d7ae7b /lib/Core | |
parent | 07581cb13d272a01adf7624ab84b6252fc7d525c (diff) | |
download | klee-31f965a01fbf7fd6e8590395de2f59d1b224607c.tar.gz |
ExecutionState: remove fnAliases
Diffstat (limited to 'lib/Core')
-rw-r--r-- | lib/Core/ExecutionState.cpp | 9 | ||||
-rw-r--r-- | lib/Core/Executor.cpp | 13 |
2 files changed, 2 insertions, 20 deletions
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)) |