| 72 | } |
| 73 | |
| 74 | std::optional<DebugInfoSelection> DebugInfoSelection::fromComponents( |
| 75 | std::vector<std::string> const& _componentNames, |
| 76 | bool _acceptWildcards |
| 77 | ) |
| 78 | { |
| 79 | solAssert(componentMap().count("*") == 0, ""); |
| 80 | |
| 81 | DebugInfoSelection selection; |
| 82 | for (auto const& component: _componentNames) |
| 83 | { |
| 84 | if (component == "*") |
| 85 | return (_acceptWildcards ? std::make_optional(AllExceptExperimental()) : std::nullopt); |
| 86 | |
| 87 | if (!selection.enable(component)) |
| 88 | return std::nullopt; |
| 89 | } |
| 90 | |
| 91 | return selection; |
| 92 | } |
| 93 | |
| 94 | bool DebugInfoSelection::enable(std::string const& _component) |
| 95 | { |