[JSON] Use LLVM's library for encoding JSON in StructuredData

This patch replaces the hand-rolled JSON emission in StructuredData with
LLVM's JSON library.

Differential revision: https://reviews.llvm.org/D68248

llvm-svn: 373359
This commit is contained in:
Jonas Devlieghere
2019-10-01 17:41:48 +00:00
parent 9292983154
commit 2783d81791
7 changed files with 57 additions and 102 deletions

View File

@@ -29,8 +29,8 @@
using namespace lldb_private;
using namespace lldb;
void StructuredPythonObject::Dump(Stream &s, bool pretty_print) const {
s << "Python Obj: 0x" << GetValue();
void StructuredPythonObject::Serialize(llvm::json::OStream &s) const {
s.value(llvm::formatv("Python Obj: {0:X}", GetValue()).str());
}
// PythonObject