Skip to content

Commit

Permalink
Only emit include for IOSystem.h when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ruricolist committed Dec 16, 2022
1 parent 09b7a26 commit 251e8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/synthesiser/Synthesiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ void Synthesiser::emitCode(std::ostream& out, const Statement& stmt) {
void visit_(type_identity<IO>, const IO& io, std::ostream& out) override {
PRINT_BEGIN_COMMENT(out);

synthesiser.currentClass->addInclude("\"souffle/io/IOSystem.h\"", true);

// print directives as C++ initializers
auto printDirectives = [&](const std::map<std::string, std::string>& registry) {
auto cur = registry.begin();
Expand Down Expand Up @@ -2648,7 +2650,6 @@ void Synthesiser::generateCode(GenDb& db, const std::string& id, bool& withShare

gen.addInclude("\"souffle/SouffleInterface.h\"");
gen.addInclude("\"souffle/SignalHandler.h\"");
gen.addInclude("\"souffle/io/IOSystem.h\"", true);

GenFunction& constructor = gen.addConstructor(Visibility::Public);

Expand Down

0 comments on commit 251e8fd

Please sign in to comment.