MCPcopy Create free account
hub / github.com/Samsung/UTopia / compile

Method compile

tests/testutil/CompileHelper.cpp:270–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270std::string
271CompileHelper::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

Callers

nothing calls this directly

Calls 3

getUniqueFilePathFunction · 0.85
getTmpDirPathFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected