| 68 | } |
| 69 | |
| 70 | void writeDataToFile(const std::string &filename, const char *data, size_t data_size) |
| 71 | { |
| 72 | std::ofstream fs(filename, std::ofstream::binary); |
| 73 | if (fs.fail()) |
| 74 | throw std::runtime_error("Cannot open file \"" + filename + "\".\n"); |
| 75 | if (fs.write(data, data_size).fail()) |
| 76 | { |
| 77 | throw std::runtime_error("Failed to write data to file \"" + filename + "\".\n"); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void checkOutputs(const luci::Module *first, const luci::Module *second) |
| 82 | { |