Skip to content

Commit 12d61dc

Browse files
committed
[fix] Remove unused field
1 parent d6c12eb commit 12d61dc

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

include/klee/Module/TargetHash.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ struct TargetCmp {
3131
bool operator()(const ref<Target> &a, const ref<Target> &b) const;
3232
};
3333

34-
typedef std::pair<llvm::BasicBlock *, llvm::BasicBlock *> Transition;
3534
typedef std::pair<llvm::BasicBlock *, unsigned> Branch;
3635

37-
struct TransitionHash {
38-
std::size_t operator()(const Transition &p) const;
39-
};
40-
4136
struct BranchHash {
4237
std::size_t operator()(const Branch &p) const;
4338
};

lib/Core/ExecutionState.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ ExecutionState::ExecutionState(const ExecutionState &state)
160160
: initPC(state.initPC), pc(state.pc), prevPC(state.prevPC),
161161
stack(state.stack), stackBalance(state.stackBalance),
162162
incomingBBIndex(state.incomingBBIndex), depth(state.depth),
163-
level(state.level), transitionLevel(state.transitionLevel),
164-
addressSpace(state.addressSpace), constraints(state.constraints),
165-
targetForest(state.targetForest), pathOS(state.pathOS),
166-
symPathOS(state.symPathOS), coveredLines(state.coveredLines),
167-
symbolics(state.symbolics), resolvedPointers(state.resolvedPointers),
163+
level(state.level), addressSpace(state.addressSpace),
164+
constraints(state.constraints), targetForest(state.targetForest),
165+
pathOS(state.pathOS), symPathOS(state.symPathOS),
166+
coveredLines(state.coveredLines), symbolics(state.symbolics),
167+
resolvedPointers(state.resolvedPointers),
168168
cexPreferences(state.cexPreferences), arrayNames(state.arrayNames),
169169
steppedInstructions(state.steppedInstructions),
170170
steppedMemoryInstructions(state.steppedMemoryInstructions),
@@ -448,9 +448,6 @@ void ExecutionState::increaseLevel() {
448448
stack.infoStack().back().multilevel.replace({srcbb, srcLevel + 1});
449449
level.insert(prevPC->parent);
450450
}
451-
if (srcbb != dstbb) {
452-
transitionLevel.insert(std::make_pair(srcbb, dstbb));
453-
}
454451
}
455452

456453
bool ExecutionState::isGEPExpr(ref<Expr> expr) const {

lib/Core/ExecutionState.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ class ExecutionState {
291291

292292
/// @brief Exploration level, i.e., number of times KLEE cycled for this state
293293
std::set<KBlock *, KBlockCompare> level;
294-
std::unordered_set<Transition, TransitionHash> transitionLevel;
295294

296295
/// @brief Address space used by this state (e.g. Global and Heap)
297296
AddressSpace addressSpace;

lib/Core/TargetCalculator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ DISABLE_WARNING_POP
3434
namespace klee {
3535
class CodeGraphInfo;
3636
class ExecutionState;
37-
struct TransitionHash;
3837

3938
enum class TrackCoverageBy { None, Blocks, Branches, All };
4039

@@ -44,7 +43,6 @@ class TargetCalculator {
4443
using StatesSet = std::unordered_set<ExecutionState *>;
4544

4645
typedef std::unordered_set<KBlock *> VisitedBlocks;
47-
typedef std::unordered_set<Transition, TransitionHash> VisitedTransitions;
4846
typedef std::unordered_set<Branch, BranchHash> VisitedBranches;
4947

5048
enum HistoryKind { Blocks, Transitions };

lib/Module/TargetHash.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ bool TargetCmp::operator()(const ref<Target> &a, const ref<Target> &b) const {
2222
return a == b;
2323
}
2424

25-
std::size_t TransitionHash::operator()(const Transition &p) const {
26-
return reinterpret_cast<size_t>(p.first) * 31 +
27-
reinterpret_cast<size_t>(p.second);
28-
}
29-
3025
std::size_t BranchHash::operator()(const Branch &p) const {
3126
return reinterpret_cast<size_t>(p.first) * 31 + p.second;
3227
}

0 commit comments

Comments
 (0)