Skip to content

Commit

Permalink
emit missing '\n' in cpp includes
Browse files Browse the repository at this point in the history
Without the added newlines this generates C++
which does not always compile, e.g.
```
compiler error: cannot compile source file "./soufflepxyz.cpp"
./soufflepxyz.cpp:4:36: warning: extra tokens at end of #include directive [-Wextra-tokens]
#include "souffle/profile/Logger.h"#include "souffle/profile/ProfileEvent.h"
                                   ^
```
  • Loading branch information
Andrew Kent authored Mar 10, 2022
1 parent 2fdbd07 commit fcd024b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/synthesiser/Synthesiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2424,8 +2424,8 @@ void Synthesiser::generateCode(std::ostream& sos, const std::string& id, bool& w
}

if (Global::config().has("profile") || Global::config().has("live-profile")) {
os << "#include \"souffle/profile/Logger.h\"";
os << "#include \"souffle/profile/ProfileEvent.h\"";
os << "#include \"souffle/profile/Logger.h\"\n";
os << "#include \"souffle/profile/ProfileEvent.h\"\n";
}

os << "\n";
Expand Down

0 comments on commit fcd024b

Please sign in to comment.