| /llvm-project/clang-tools-extra/clangd/ |
| H A D | Protocol.cpp | 32 bool mapOptOrNull(const llvm::json::Value &Params, llvm::StringLiteral Prop, in mapOptOrNull() 33 T &Out, llvm::json::Path P) { in mapOptOrNull() 67 bool fromJSON(const llvm::json::Value &E, URIForFile &R, llvm::json::Path P) { in fromJSON() 92 llvm::json::Value toJSON(const URIForFile &U) { return U.uri(); } in toJSON() 98 llvm::json::Value toJSON(const TextDocumentIdentifier &R) { in toJSON() 99 return llvm::json::Object{{"uri", R.uri}}; in toJSON() 102 bool fromJSON(const llvm::json::Value &Params, TextDocumentIdentifier &R, in fromJSON() 103 llvm::json::Path P) { in fromJSON() 104 llvm::json in fromJSON() [all...] |
| H A D | Protocol.h | 80 bool fromJSON(const llvm::json::Value &, SymbolID &, llvm::json::Path); 81 llvm::json::Value toJSON(const SymbolID &); 128 llvm::json::Value toJSON(const URIForFile &U); 129 bool fromJSON(const llvm::json::Value &, URIForFile &, llvm::json::Path); 135 llvm::json::Value toJSON(const TextDocumentIdentifier &); 136 bool fromJSON(const llvm::json::Value &, TextDocumentIdentifier &, 137 llvm::json::Path); 152 llvm::json [all...] |
| /llvm-project/mlir/lib/Tools/lsp-server-support/ |
| H A D | Protocol.cpp | 32 static bool mapOptOrNull(const llvm::json::Value ¶ms, in mapOptOrNull() 34 llvm::json::Path path) { in mapOptOrNull() 35 const llvm::json::Object *o = params.getAsObject(); in mapOptOrNull() 247 bool mlir::lsp::fromJSON(const llvm::json::Value &value, URIForFile &result, in fromJSON() 248 llvm::json::Path path) { in fromJSON() 262 llvm::json::Value mlir::lsp::toJSON(const URIForFile &value) { in toJSON() 274 bool mlir::lsp::fromJSON(const llvm::json::Value &value, in fromJSON() 275 ClientCapabilities &result, llvm::json::Path path) { in fromJSON() 276 const llvm::json::Object *o = value.getAsObject(); in fromJSON() 281 if (const llvm::json::Object *textDocument = o->getObject("textDocument")) { in fromJSON() [all …]
|
| H A D | Transport.cpp | 34 Reply(const llvm::json::Value &id, StringRef method, JSONTransport &transport, 41 void operator()(llvm::Expected<llvm::json::Value> reply); 46 llvm::json::Value id; 52 Reply::Reply(const llvm::json::Value &id, llvm::StringRef method, in Reply() 64 void Reply::operator()(llvm::Expected<llvm::json::Value> reply) { in operator ()() 87 bool MessageHandler::onNotify(llvm::StringRef method, llvm::json::Value value) { in onNotify() 102 bool MessageHandler::onCall(llvm::StringRef method, llvm::json::Value params, in onCall() 103 llvm::json::Value id) { in onCall() 118 bool MessageHandler::onReply(llvm::json::Value id, in onReply() 119 llvm::Expected<llvm::json in onReply() 211 std::string json; run() local 306 readStandardMessage(std::string & json) readStandardMessage() argument 352 readDelimitedMessage(std::string & json) readDelimitedMessage() argument [all...] |
| /llvm-project/llvm/tools/llvm-cov/ |
| H A D | CoverageExporterJson.cpp | 15 // The json code coverage export follows the following format 68 #define LLVM_COVERAGE_EXPORT_JSON_TYPE_STR "llvm.coverage.json.export" 83 json::Array renderSegment(const coverage::CoverageSegment &Segment) { in renderSegment() 84 return json::Array({Segment.Line, Segment.Col, in renderSegment() 89 json::Array renderRegion(const coverage::CountedRegion &Region) { in renderRegion() 90 return json::Array({Region.LineStart, Region.ColumnStart, Region.LineEnd, in renderRegion() 96 json::Array renderBranch(const coverage::CountedRegion &Region) { in renderBranch() 97 return json::Array( in renderBranch() 104 json::Array gatherConditions(const coverage::MCDCRecord &Record) { in gatherConditions() 105 json in gatherConditions() [all...] |
| /llvm-project/lldb/tools/lldb-dap/ |
| H A D | JSONUtils.h | 31 /// Emplace a StringRef in a json::Object after enusring that the 32 /// string is valid UTF8. If not, first call llvm::json::fixUTF8 43 void EmplaceSafeString(llvm::json::Object &obj, llvm::StringRef key, 54 llvm::StringRef GetAsString(const llvm::json::Value &value); 72 llvm::StringRef GetString(const llvm::json::Object &obj, llvm::StringRef key, 74 llvm::StringRef GetString(const llvm::json::Object *obj, llvm::StringRef key, 90 uint64_t GetUnsigned(const llvm::json::Object &obj, llvm::StringRef key, 92 uint64_t GetUnsigned(const llvm::json::Object *obj, llvm::StringRef key, 108 bool GetBoolean(const llvm::json::Object &obj, llvm::StringRef key, 110 bool GetBoolean(const llvm::json [all...] |
| H A D | JSONUtils.cpp | 59 void EmplaceSafeString(llvm::json::Object &obj, llvm::StringRef key, in GetString() 61 if (LLVM_LIKELY(llvm::json::isUTF8(str))) in GetString() 64 obj.try_emplace(key, llvm::json::fixUTF8(str)); 67 llvm::StringRef GetAsString(const llvm::json::Value &value) { in GetUnsigned() 74 llvm::StringRef GetString(const llvm::json::Object &obj, llvm::StringRef key, in GetUnsigned() 81 llvm::StringRef GetString(const llvm::json::Object *obj, llvm::StringRef key, in GetBoolean() 90 uint64_t GetUnsigned(const llvm::json::Object &obj, llvm::StringRef key, in GetBoolean() 97 uint64_t GetUnsigned(const llvm::json::Object *obj, llvm::StringRef key, in GetSigned() 104 bool GetBoolean(const llvm::json::Object &obj, llvm::StringRef key, in GetSigned() 113 bool GetBoolean(const llvm::json in ObjectContainsKey() 1381 JSONToString(const llvm::json::Value & json) JSONToString() argument [all...] |
| H A D | lldb-dap.cpp | 117 typedef void (*RequestCallback)(const llvm::json::Object &command); in PrintWelcomeMessage() 196 llvm::json::Object event(CreateEventObject("exited")); in SendThreadExitedEvent() 197 llvm::json::Object body; in SendThreadExitedEvent() 200 dap.SendJSON(llvm::json::Value(std::move(event))); in SendThreadExitedEvent() 204 llvm::json::Object event(CreateEventObject("thread")); 205 llvm::json::Object body; 209 dap.SendJSON(llvm::json::Value(std::move(event))); in SendContinuedEvent() 225 llvm::json::Object event(CreateEventObject("continued")); in SendContinuedEvent() 226 llvm::json::Object body; 230 dap.SendJSON(llvm::json in SendTerminatedEvent() [all...] |
| /llvm-project/lldb/unittests/Symbol/ |
| H A D | JSONSymbolTest.cpp | 34 Expected<json::Value> json = json::parse(text); in TEST() local 35 ASSERT_TRUE(static_cast<bool>(json)); in TEST() 37 json::Path::Root root; in TEST() 39 ASSERT_TRUE(fromJSON(*json, json_symbol, root)); in TEST() 72 Expected<json::Value> json = json::parse(text); in TEST() local 73 EXPECT_THAT_EXPECTED(json, llvm::Succeeded()); in TEST() 75 json::Path::Root root; in TEST() 77 ASSERT_TRUE(fromJSON(*json, json_symbol, root)); in TEST() 98 Expected<json::Value> json = json::parse(text); in TEST() local 99 EXPECT_THAT_EXPECTED(json, llvm::Succeeded()); in TEST() [all …]
|
| /llvm-project/lldb/include/lldb/Utility/ |
| H A D | TraceGDBRemotePackets.h | 35 bool fromJSON(const llvm::json::Value &value, TraceSupportedResponse &info, 36 llvm::json::Path path); 38 llvm::json::Value toJSON(const TraceSupportedResponse &packet); 56 bool fromJSON(const llvm::json::Value &value, TraceStartRequest &packet, 57 llvm::json::Path path); 59 llvm::json::Value toJSON(const TraceStartRequest &packet); 80 bool fromJSON(const llvm::json::Value &value, TraceStopRequest &packet, 81 llvm::json::Path path); 83 llvm::json::Value toJSON(const TraceStopRequest &packet); 93 bool fromJSON(const llvm::json::Value &value, TraceGetStateRequest &packet, [all …]
|
| H A D | TraceIntelPTGDBRemotePackets.h | 61 bool fromJSON(const llvm::json::Value &value, TraceIntelPTStartRequest &packet, 62 llvm::json::Path path); 64 llvm::json::Value toJSON(const TraceIntelPTStartRequest &packet); 76 llvm::json::Value toJSON(const JSONUINT64 &uint64, bool hex); 78 bool fromJSON(const llvm::json::Value &value, JSONUINT64 &uint64, 79 llvm::json::Path path); 118 bool fromJSON(const llvm::json::Value &value, 119 LinuxPerfZeroTscConversion &packet, llvm::json::Path path); 121 llvm::json::Value toJSON(const LinuxPerfZeroTscConversion &packet); 123 bool fromJSON(const llvm::json::Value &value, [all …]
|
| /llvm-project/mlir/include/mlir/Tools/lsp-server-support/ |
| H A D | Protocol.h | 144 llvm::json::Value toJSON(const URIForFile &value); 145 bool fromJSON(const llvm::json::Value &value, URIForFile &result, 146 llvm::json::Path path); 164 bool fromJSON(const llvm::json::Value &value, ClientCapabilities &result, 165 llvm::json::Path path); 180 bool fromJSON(const llvm::json::Value &value, ClientInfo &result, 181 llvm::json::Path path); 194 bool fromJSON(const llvm::json::Value &value, TraceLevel &result, 195 llvm::json::Path path); 209 bool fromJSON(const llvm::json::Value &value, InitializeParams &result, [all …]
|
| H A D | Transport.h | 56 void notify(StringRef method, llvm::json::Value params); 57 void call(StringRef method, llvm::json::Value params, llvm::json::Value id); 58 void reply(llvm::json::Value id, llvm::Expected<llvm::json::Value> result); 65 bool handleMessage(llvm::json::Value msg, MessageHandler &handler); 67 void sendMessage(llvm::json::Value msg); 70 LogicalResult readMessage(std::string &json) { in readMessage() argument 71 return style == JSONStreamStyle::Delimited ? readDelimitedMessage(json) in readMessage() 72 : readStandardMessage(json); in readMessage() 74 LogicalResult readDelimitedMessage(std::string &json); 75 LogicalResult readStandardMessage(std::string &json); [all …]
|
| /llvm-project/mlir/unittests/Tools/lsp-server-support/ |
| H A D | Protocol.cpp | 23 llvm::json::Value json = toJSON(diagnostic); in TEST() local 24 const llvm::json::Object *o = json.getAsObject(); in TEST() 25 const llvm::json::Array *v = o->get("tags")->getAsArray(); in TEST() 26 EXPECT_EQ(*v, llvm::json::Array{1}); in TEST() 29 llvm::json::Path::Root root = llvm::json::Path::Root(); in TEST() 30 bool success = fromJSON(json, parsed, llvm::json::Path(root)); in TEST() 39 llvm::json::Value json = toJSON(diagnostic); in TEST() local 40 const llvm::json::Object *o = json.getAsObject(); in TEST() 41 const llvm::json::Value *v = o->get("tags"); in TEST() 45 llvm::json::Path::Root root = llvm::json::Path::Root(); in TEST() [all …]
|
| /llvm-project/clang/lib/Basic/ |
| H A D | Sarif.cpp | 144 static json::Object createMessage(StringRef Text) { in createMessage() 145 return json::Object{{"text", Text.str()}}; in createMessage() 150 static json::Object createTextRegion(const SourceManager &SM, in createTextRegion() 154 json::Object Region{{"startLine", BeginCharLoc.getExpansionLineNumber()}, in createTextRegion() 166 static json::Object createLocation(json::Object &&PhysicalLocation, in createLocation() 168 json::Object Ret{{"physicalLocation", std::move(PhysicalLocation)}}; in createLocation() 201 static json::Object 202 createThreadFlowLocation(json::Object &&Location, in createThreadFlowLocation() 204 return json in createThreadFlowLocation() [all...] |
| /llvm-project/lldb/source/Utility/ |
| H A D | TraceGDBRemotePackets.cpp | 12 using namespace llvm::json; 17 bool fromJSON(const json::Value &value, TraceSupportedResponse &packet, in fromJSON() 24 json::Value toJSON(const TraceSupportedResponse &packet) { in toJSON() 25 return json::Value( in toJSON() 34 bool fromJSON(const json::Value &value, TraceStartRequest &packet, Path path) { in fromJSON() 39 json::Value toJSON(const TraceStartRequest &packet) { in toJSON() 40 return json::Value(Object{{"tids", packet.tids}, {"type", packet.type}}); in toJSON() 56 bool fromJSON(const json::Value &value, TraceStopRequest &packet, Path path) { in fromJSON() 61 json::Value toJSON(const TraceStopRequest &packet) { in toJSON() 62 return json::Value(Object{{"type", packet.type}, {"tids", packet.tids}}); in toJSON() [all …]
|
| H A D | TraceIntelPTGDBRemotePackets.cpp | 12 using namespace llvm::json; 25 json::Value toJSON(const JSONUINT64 &uint64, bool hex) { in toJSON() 27 return json::Value(formatv("{0:x+}", uint64.value)); in toJSON() 29 return json::Value(formatv("{0}", uint64.value)); in toJSON() 32 bool fromJSON(const json::Value &value, JSONUINT64 &uint64, Path path) { in fromJSON() 45 bool fromJSON(const json::Value &value, TraceIntelPTStartRequest &packet, in fromJSON() 63 json::Value toJSON(const TraceIntelPTStartRequest &packet) { in toJSON() 64 json::Value base = toJSON((const TraceStartRequest &)packet); in toJSON() 65 json::Object &obj = *base.getAsObject(); in toJSON() 89 json::Value toJSON(const LinuxPerfZeroTscConversion &packet) { in toJSON() [all …]
|
| /llvm-project/lldb/source/Plugins/Trace/intel-pt/ |
| H A D | TraceIntelPTJSONStructs.h | 63 llvm::json::Value toJSON(const JSONModule &module); 65 llvm::json::Value toJSON(const JSONThread &thread); 67 llvm::json::Value toJSON(const JSONProcess &process); 69 llvm::json::Value toJSON(const JSONCpu &cpu); 71 llvm::json::Value toJSON(const pt_cpu &cpu_info); 73 llvm::json::Value toJSON(const JSONKernel &kernel); 75 llvm::json::Value toJSON(const JSONTraceBundleDescription &bundle_description); 77 bool fromJSON(const llvm::json::Value &value, JSONModule &module, 78 llvm::json::Path path); 80 bool fromJSON(const llvm::json::Value &value, JSONThread &thread, [all …]
|
| H A D | TraceIntelPTJSONStructs.cpp | 18 using namespace llvm::json; 33 json::Value toJSON(const JSONModule &module) { in toJSON() 34 json::Object json_module; in toJSON() 44 bool fromJSON(const json::Value &value, JSONModule &module, Path path) { in fromJSON() 52 json::Value toJSON(const JSONThread &thread) { in toJSON() 53 json::Object obj{{"tid", thread.tid}}; in toJSON() 59 bool fromJSON(const json::Value &value, JSONThread &thread, Path path) { in fromJSON() 64 json::Value toJSON(const JSONProcess &process) { in toJSON() 73 bool fromJSON(const json::Value &value, JSONProcess &process, Path path) { in fromJSON() 79 json::Value toJSON(const JSONCpu &cpu) { in toJSON() [all …]
|
| /llvm-project/clang-tools-extra/clangd/unittests/xpc/ |
| H A D | ConversionTests.cpp | 23 {json::Value(false), json::Value(3.14), json::Value(42), in TEST() 24 json::Value(-100), json::Value("foo"), json::Value(""), in TEST() 25 json::Value("123"), json::Value(" "), in TEST() 26 json::Value{true, "foo", nullptr, 42}, in TEST() 27 json::Value(json::Object{ in TEST()
|
| /llvm-project/clang-tools-extra/clangd/xpc/ |
| H A D | XPCTransport.cpp | 23 json::Object encodeError(Error E) { in encodeError() 34 return json::Object{ in encodeError() 40 Error decodeError(const json::Object &O) { in decodeError() 57 void notify(StringRef Method, json::Value Params) override { in notify() 58 sendMessage(json::Object{ in notify() 64 void call(StringRef Method, json::Value Params, json::Value ID) override { in call() 65 sendMessage(json::Object{ in call() 72 void reply(json::Value ID, Expected<json::Value> Result) override { in reply() 74 sendMessage(json::Object{ in reply() 80 sendMessage(json::Object{ in reply() [all …]
|
| /llvm-project/clang-tools-extra/clangd/unittests/ |
| H A D | LSPClient.cpp | 39 llvm::Expected<llvm::json::Value> clang::clangd::LSPClient::CallResult::take() { in take() 45 return llvm::json::Value(nullptr); in take() 52 llvm::json::Value LSPClient::CallResult::takeValue() { in takeValue() 56 return llvm::json::Value(nullptr); in takeValue() 61 void LSPClient::CallResult::set(llvm::Expected<llvm::json::Value> V) { in set() 78 static void logBody(llvm::StringRef Method, llvm::json::Value V, bool Send) { in logBody() 85 std::pair<llvm::json::Value, CallResult *> addCallSlot() { in addCallSlot() 99 std::vector<llvm::json::Value> takeNotifications(llvm::StringRef Method) { in takeNotifications() 100 std::vector<llvm::json::Value> Result; in takeNotifications() 113 std::vector<llvm::json::Value> takeCallParams(llvm::StringRef Method) { in takeCallParams() [all …]
|
| /llvm-project/libc/benchmarks/ |
| H A D | JSON.cpp | 32 static Error intFromJsonTemplate(const json::Value &V, T &Out) { in intFromJsonTemplate() 44 static Error fromJson(const json::Value &V, bool &Out) { in fromJson() 52 static Error fromJson(const json::Value &V, double &Out) { in fromJson() 60 static Error fromJson(const json::Value &V, std::string &Out) { in fromJson() 68 static Error fromJson(const json::Value &V, uint32_t &Out) { in fromJson() 72 static Error fromJson(const json::Value &V, int &Out) { in fromJson() 76 static Error fromJson(const json::Value &V, libc_benchmarks::Duration &D) { in fromJson() 77 if (V.kind() != json::Value::Kind::Number) in fromJson() 83 static Error fromJson(const json::Value &V, MaybeAlign &Out) { in fromJson() 101 static Error fromJson(const json::Value &V, in fromJson() [all …]
|
| /llvm-project/lldb/source/Plugins/ObjectFile/JSON/ |
| H A D | ObjectFileJSON.cpp | 65 Expected<json::Value> json = json::parse(text); in CreateInstance() local 66 if (!json) { in CreateInstance() 67 LLDB_LOG_ERROR(log, json.takeError(), in CreateInstance() 72 json::Path::Root root; in CreateInstance() 74 if (!fromJSON(*json, header, root)) { in CreateInstance() 86 if (!fromJSON(*json, body, root)) { in CreateInstance() 123 Expected<json::Value> json = json::parse(text); in GetModuleSpecifications() local 124 if (!json) { in GetModuleSpecifications() 125 LLDB_LOG_ERROR(log, json.takeError(), in GetModuleSpecifications() 130 json::Path::Root root; in GetModuleSpecifications() [all …]
|
| /llvm-project/lld/test/MachO/ |
| H A D | time-trace.s | 11 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_k… 17 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_k… 22 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_k…
|