| 53 | } |
| 54 | |
| 55 | void |
| 56 | WriteToFile(std::string const& filePath, std::string const& content) |
| 57 | { |
| 58 | auto fileStream = std::ofstream(filePath, std::ofstream::binary | std::ofstream::out); |
| 59 | if (!fileStream.is_open()) |
| 60 | { |
| 61 | throw std::runtime_error("Could not open out file at " + filePath); |
| 62 | } |
| 63 | fileStream << content; |
| 64 | fileStream.close(); |
| 65 | } |
| 66 | } // namespace util |
| 67 | } // namespace codegen |