| 58 | } |
| 59 | |
| 60 | std::optional<DebugInfoSelection> DebugInfoSelection::fromString(std::string_view _input) |
| 61 | { |
| 62 | // TODO: Make more stuff constexpr and make it a static_assert(). |
| 63 | solAssert(componentMap().count("all") == 0, ""); |
| 64 | solAssert(componentMap().count("none") == 0, ""); |
| 65 | |
| 66 | if (_input == "all") |
| 67 | return AllExceptExperimental(); |
| 68 | if (_input == "none") |
| 69 | return None(); |
| 70 | |
| 71 | return fromComponents(_input | ranges::views::split(',') | ranges::to<std::vector<std::string>>); |
| 72 | } |
| 73 | |
| 74 | std::optional<DebugInfoSelection> DebugInfoSelection::fromComponents( |
| 75 | std::vector<std::string> const& _componentNames, |