Skip to content

Commit e7a3b98

Browse files
committed
C++ code cleanup
1 parent 9ca1a0c commit e7a3b98

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

genmc-sys/src_cpp/MiriInterface.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
#include <memory>
2525
#include <utility>
2626

27-
using AnnotID = ModuleID::ID;
28-
using AnnotT = SExpr<AnnotID>;
29-
3027
// Return -1 when no thread can/should be scheduled, or the thread id of the next thread
3128
// NOTE: this is safe because ThreadId is 32 bit, and we return a 64 bit integer
3229
// FIXME(genmc,cxx): could directly return std::optional if CXX ever supports sharing it (see https://github.com/dtolnay/cxx/issues/87).
@@ -37,11 +34,8 @@ auto MiriGenMCShim::scheduleNext(const int curr_thread_id,
3734
// a scheduling decision.
3835
globalInstructions[curr_thread_id].kind = curr_thread_next_instr_kind;
3936

40-
auto result = GenMCDriver::scheduleNext(globalInstructions);
41-
if (result.has_value())
42-
{
37+
if (const auto result = GenMCDriver::scheduleNext(globalInstructions))
4338
return static_cast<int64_t>(result.value());
44-
}
4539
return -1;
4640
}
4741

@@ -52,8 +46,6 @@ auto MiriGenMCShim::createHandle(const GenmcParams &config)
5246
-> std::unique_ptr<MiriGenMCShim>
5347
{
5448
auto conf = std::make_shared<Config>();
55-
// TODO GENMC: Can we get some default values somehow?
56-
// Config::saveConfigOptions(*conf);
5749

5850
// NOTE: Miri already initialization checks, so we can disable them in GenMC
5951
conf->skipNonAtomicInitializedCheck = true;
@@ -145,6 +137,7 @@ void MiriGenMCShim::handleExecutionStart()
145137
{
146138
globalInstructions.clear();
147139
globalInstructions.push_back(Action(ActionKind::Load, Event::getInit()));
140+
148141
GenMCDriver::handleExecutionStart();
149142
}
150143

0 commit comments

Comments
 (0)