| 414 | } |
| 415 | |
| 416 | bool TestBase::load(const std::string &CODE, std::string Opt, |
| 417 | CompileHelper::SourceType Type) { |
| 418 | CH = TestHelperFactory().createCompileHelper(CODE, "default_test", Opt, Type); |
| 419 | if (!CH) |
| 420 | return false; |
| 421 | |
| 422 | SC = CH->load(); |
| 423 | if (!SC) |
| 424 | return false; |
| 425 | |
| 426 | const auto &M = SC->getLLVMModule(); |
| 427 | IRAH = std::make_shared<IRAccessHelper>(M); |
| 428 | if (!IRAH) |
| 429 | return false; |
| 430 | |
| 431 | AIMap = std::make_unique<DebugInfoMap>(*SC); |
| 432 | if (!AIMap) |
| 433 | return false; |
| 434 | |
| 435 | return true; |
| 436 | } |
| 437 | |
| 438 | bool TestBase::loadC(const std::string &CODE, std::string Opt) { |
| 439 | return load(CODE, Opt, CompileHelper::SourceType_C); |
no test coverage detected