| 268 | } |
| 269 | |
| 270 | std::string |
| 271 | CompileHelper::IRData::compile(const SourceFileData &SourceFile) const { |
| 272 | |
| 273 | auto Compiler = CompileHelper::getCompiler(SourceFile.Type); |
| 274 | if (Compiler.empty()) |
| 275 | return ""; |
| 276 | |
| 277 | auto Result = getUniqueFilePath(getTmpDirPath(), SourceFile.Name, "bc"); |
| 278 | auto CMD = Compiler + " " + SourceFile.Opt + " -emit-llvm -o " + Result + |
| 279 | " -c " + SourceFile.Path; |
| 280 | if (system(CMD.c_str()) || !fs::exists(Result)) |
| 281 | return ""; |
| 282 | |
| 283 | return Result; |
| 284 | } |
| 285 | |
| 286 | } // namespace ftg |
nothing calls this directly
no test coverage detected