aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Core
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2018-07-07 20:37:50 +0100
committerMartinNowack <martin.nowack@gmail.com>2018-07-11 10:32:52 +0100
commiteff4d9c370782bbe72a9ea8cf083db2debe54d92 (patch)
tree39892e377a316a04a04ab762042091d654329d7a /lib/Core
parent0804c98436d9507d9074ad9ea958d98692e3f89c (diff)
downloadklee-eff4d9c370782bbe72a9ea8cf083db2debe54d92.tar.gz
Added "override" in Executor.h to silence compiler warnings (and ran clang-format on patch)
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.h57
1 files changed, 26 insertions, 31 deletions
diff --git a/lib/Core/Executor.h b/lib/Core/Executor.h
index 6ad5e987..ec2d49c0 100644
--- a/lib/Core/Executor.h
+++ b/lib/Core/Executor.h
@@ -185,8 +185,10 @@ private:
/// When non-null the bindings that will be used for calls to
/// klee_make_symbolic in order replay.
const struct KTest *replayKTest;
+
/// When non-null a list of branch decisions to be used for replay.
const std::vector<bool> *replayPath;
+
/// The index into the current \ref replayKTest or \ref replayPath
/// object.
unsigned replayPosition;
@@ -472,20 +474,19 @@ public:
return *interpreterHandler;
}
- virtual void setPathWriter(TreeStreamWriter *tsw) {
- pathWriter = tsw;
- }
- virtual void setSymbolicPathWriter(TreeStreamWriter *tsw) {
+ void setPathWriter(TreeStreamWriter *tsw) override { pathWriter = tsw; }
+
+ void setSymbolicPathWriter(TreeStreamWriter *tsw) override {
symPathWriter = tsw;
}
- virtual void setReplayKTest(const struct KTest *out) {
+ void setReplayKTest(const struct KTest *out) override {
assert(!replayPath && "cannot replay both buffer and path");
replayKTest = out;
replayPosition = 0;
}
- virtual void setReplayPath(const std::vector<bool> *path) {
+ void setReplayPath(const std::vector<bool> *path) override {
assert(!replayKTest && "cannot replay both buffer and path");
replayPath = path;
replayPosition = 0;
@@ -494,45 +495,39 @@ public:
llvm::Module *setModule(std::vector<std::unique_ptr<llvm::Module>> &modules,
const ModuleOptions &opts) override;
- virtual void useSeeds(const std::vector<struct KTest *> *seeds) {
+ void useSeeds(const std::vector<struct KTest *> *seeds) override {
usingSeeds = seeds;
}
- virtual void runFunctionAsMain(llvm::Function *f,
- int argc,
- char **argv,
- char **envp);
+ void runFunctionAsMain(llvm::Function *f, int argc, char **argv,
+ char **envp) override;
/*** Runtime options ***/
-
- virtual void setHaltExecution(bool value) {
- haltExecution = value;
- }
- virtual void setInhibitForking(bool value) {
- inhibitForking = value;
- }
+ void setHaltExecution(bool value) override { haltExecution = value; }
+
+ void setInhibitForking(bool value) override { inhibitForking = value; }
- void prepareForEarlyExit();
+ void prepareForEarlyExit() override;
/*** State accessor methods ***/
- virtual unsigned getPathStreamID(const ExecutionState &state);
+ unsigned getPathStreamID(const ExecutionState &state) override;
- virtual unsigned getSymbolicPathStreamID(const ExecutionState &state);
+ unsigned getSymbolicPathStreamID(const ExecutionState &state) override;
- virtual void getConstraintLog(const ExecutionState &state,
- std::string &res,
- Interpreter::LogType logFormat = Interpreter::STP);
+ void getConstraintLog(const ExecutionState &state, std::string &res,
+ Interpreter::LogType logFormat =
+ Interpreter::STP) override;
- virtual bool getSymbolicSolution(const ExecutionState &state,
- std::vector<
- std::pair<std::string,
- std::vector<unsigned char> > >
- &res);
+ bool getSymbolicSolution(
+ const ExecutionState &state,
+ std::vector<std::pair<std::string, std::vector<unsigned char>>> &res)
+ override;
- virtual void getCoveredLines(const ExecutionState &state,
- std::map<const std::string*, std::set<unsigned> > &res);
+ void getCoveredLines(const ExecutionState &state,
+ std::map<const std::string *, std::set<unsigned>> &res)
+ override;
Expr::Width getWidthForLLVMType(llvm::Type *type) const;
size_t getAllocationAlignment(const llvm::Value *allocSite) const;