| 300 | } |
| 301 | |
| 302 | bool parse_disable_token(const char* token) { |
| 303 | const std::string tok(token); |
| 304 | std::vector<std::string> names; |
| 305 | std::string current; |
| 306 | |
| 307 | for (const char c : tok) { |
| 308 | if (c == ',') { |
| 309 | if (!current.empty()) { |
| 310 | names.push_back(current); |
| 311 | current.clear(); |
| 312 | } |
| 313 | } else { |
| 314 | current += c; |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | if (!current.empty()) { |
| 319 | names.push_back(current); |
| 320 | } |
| 321 | |
| 322 | for (const auto& name : names) { |
| 323 | const std::pair<bool, VM::enum_flags> technique = string_to_technique(name); |
| 324 | |
| 325 | const bool found = technique.first; |
| 326 | const VM::enum_flags flag = technique.second; |
| 327 | |
| 328 | if (!found) { |
| 329 | std::cerr << "Unknown technique \"" << name << "\", aborting\n"; |
| 330 | return false; |
| 331 | } |
| 332 | |
| 333 | VM::disabled_techniques.push_back(flag); |
| 334 | } |
| 335 | |
| 336 | return true; |
| 337 | } |
| 338 | |
| 339 | void generate_json(const char* output) { |
| 340 | const VM::vmaware vm(VM::MULTIPLE); |
no test coverage detected