| 47 | } |
| 48 | |
| 49 | std::vector<Symbol<void>> JITLibrary::getCodes(size_t Offset, |
| 50 | size_t Size) noexcept { |
| 51 | std::vector<Symbol<void>> Result; |
| 52 | Result.reserve(Size); |
| 53 | for (size_t I = 0; I < Size; ++I) { |
| 54 | const std::string Name = fmt::format("f{}"sv, I + Offset); |
| 55 | if (auto Symbol = J->lookup<void>(Name.c_str())) { |
| 56 | Result.push_back(createSymbol<void>(*Symbol)); |
| 57 | } else { |
| 58 | spdlog::error("{}"sv, Symbol.error().message().string_view()); |
| 59 | Result.emplace_back(); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | return Result; |
| 64 | } |
| 65 | |
| 66 | Expect<std::shared_ptr<Executable>> JIT::load(Data D) noexcept { |
| 67 | OrcLLJIT J; |
no test coverage detected