| 337 | } |
| 338 | |
| 339 | std::shared_ptr<CompileHelper> |
| 340 | TestHelperFactory::createCompileHelper(std::string Code, std::string Name, |
| 341 | std::string Opt, |
| 342 | CompileHelper::SourceType Type) const { |
| 343 | |
| 344 | auto Compile = std::make_shared<CompileHelper>(); |
| 345 | if (!Compile) |
| 346 | return nullptr; |
| 347 | if (!Compile->add(Code, Name, Opt, Type)) |
| 348 | return nullptr; |
| 349 | if (!Compile->compileAST()) |
| 350 | return nullptr; |
| 351 | if (!Compile->compileIR()) |
| 352 | return nullptr; |
| 353 | return Compile; |
| 354 | } |
| 355 | |
| 356 | std::shared_ptr<CompileHelper> TestHelperFactory::createCompileHelper( |
| 357 | std::string SrcDir, std::vector<std::string> SrcPaths, std::string Opt, |