Skip to content

Commit c2a081b

Browse files
committed
clang-format
1 parent 7b0ad64 commit c2a081b

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/ast2ram/seminaive/UnitTranslator.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -711,12 +711,11 @@ Own<ram::Sequence> UnitTranslator::generateProgram(const ast::TranslationUnit& t
711711
// Add the subroutine
712712
const ast::Relation* rel = *context->getRelationsInSCC(sccOrdering.at(i)).begin();
713713

714-
std::string stratumID = rel->getQualifiedName().toString();//toString(i);
714+
std::string stratumID = rel->getQualifiedName().toString();
715715
addRamSubroutine(stratumID, std::move(stratum));
716716

717717
// invoke the strata
718718
appendStmt(res, mk<ram::Call>("stratum_" + stratumID));
719-
720719
}
721720

722721
// Add main timer if profiling

src/synthesiser/Synthesiser.cpp

+8-12
Original file line numberDiff line numberDiff line change
@@ -2652,8 +2652,7 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare
26522652
std::tie(kind, name, ty) = arg;
26532653
out << (kind == Relation ? "*" : "") << name;
26542654
});
2655-
subroutineInits.push_back(
2656-
std::make_pair(sub.first, initStr.str()));
2655+
subroutineInits.push_back(std::make_pair(sub.first, initStr.str()));
26572656

26582657
GenFunction& run = gen.addFunction("run", Visibility::Public);
26592658
run.setRetType("void");
@@ -3093,8 +3092,7 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare
30933092
std::size_t subroutineNum = 0;
30943093
for (auto& sub : prog.getSubroutines()) {
30953094
executeSubroutine.body() << "if (name == \"" << sub.first << "\") {\n"
3096-
<< convertStratumIdent("stratum_" + sub.first)
3097-
<< ".run(args, ret);\n"
3095+
<< convertStratumIdent("stratum_" + sub.first) << ".run(args, ret);\n"
30983096
<< "return;"
30993097
<< "}\n";
31003098
subroutineNum++;
@@ -3128,19 +3126,17 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare
31283126
GenFunction& factoryConstructor = factory.addConstructor(Visibility::Public);
31293127
factoryConstructor.setNextInitializer("ProgramFactory", "\"" + id + "\"");
31303128

3131-
31323129
std::ostream& hook = mainClass.hooks();
31333130
std::ostream& factory_hook = factory.hooks();
31343131

31353132
// hidden hooks
31363133
hook << "namespace souffle {\n";
31373134
hook << "SouffleProgram *newInstance_" << id << "(){return new " << classname << ";}\n";
31383135
hook << "SymbolTable *getST_" << id << "(SouffleProgram *p){return &reinterpret_cast<" << classname
3139-
<< "*>(p)->getSymbolTable();}\n";
3136+
<< "*>(p)->getSymbolTable();}\n";
31403137

31413138
hook << "} // namespace souffle\n";
31423139

3143-
31443140
factory_hook << "namespace souffle \{\n";
31453141
factory_hook << "\n#ifdef __EMBEDDED_SOUFFLE__\n";
31463142
factory_hook << "extern \"C\" {\n";
@@ -3184,15 +3180,15 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare
31843180

31853181
if (Global::config().has("profile")) {
31863182
hook << R"_(souffle::ProfileEventSingleton::instance().makeConfigRecord("", opt.getSourceFileName());)_"
3187-
<< '\n';
3183+
<< '\n';
31883184
hook << R"_(souffle::ProfileEventSingleton::instance().makeConfigRecord("fact-dir", opt.getInputFileDir());)_"
3189-
<< '\n';
3185+
<< '\n';
31903186
hook << R"_(souffle::ProfileEventSingleton::instance().makeConfigRecord("jobs", std::to_string(opt.getNumJobs()));)_"
3191-
<< '\n';
3187+
<< '\n';
31923188
hook << R"_(souffle::ProfileEventSingleton::instance().makeConfigRecord("output-dir", opt.getOutputFileDir());)_"
3193-
<< '\n';
3189+
<< '\n';
31943190
hook << R"_(souffle::ProfileEventSingleton::instance().makeConfigRecord("version", ")_"
3195-
<< Global::config().get("version") << R"_(");)_" << '\n';
3191+
<< Global::config().get("version") << R"_(");)_" << '\n';
31963192
}
31973193
hook << "obj.runAll(opt.getInputFileDir(), opt.getOutputFileDir());\n";
31983194

0 commit comments

Comments
 (0)