MCPcopy Create free account
hub / github.com/Samsung/UTopia / fromJson

Method fromJson

lib/target_analysis/TargetLib.cpp:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9const std::set<std::string> TargetLib::getAPIs() const { return APIs; }
10
11bool 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
24Json::Value TargetLib::toJson() const {
25 Json::Value Json;

Callers 1

loadExternalsMethod · 0.45

Calls 4

isNullMethod · 0.80
emptyMethod · 0.80
asStringMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected