| 9 | const std::set<std::string> TargetLib::getAPIs() const { return APIs; } |
| 10 | |
| 11 | bool TargetLib::fromJson(Json::Value Json) { |
| 12 | try { |
| 13 | if (Json.isNull() || Json.empty()) |
| 14 | throw Json::LogicError("Abnormal Json Value"); |
| 15 | for (auto API : Json["APIs"]) |
| 16 | APIs.emplace(API.asString()); |
| 17 | } catch (Json::LogicError &E) { |
| 18 | llvm::outs() << "[E] " << E.what() << "\n"; |
| 19 | return false; |
| 20 | } |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | Json::Value TargetLib::toJson() const { |
| 25 | Json::Value Json; |
no test coverage detected