diff options
author | Pavel Labath <labath@google.com> | 2017-06-27 10:45:31 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-06-27 10:45:31 +0000 |
commit | f2a8bccf8542c3d561e4537b67901ecdb74f4a29 (patch) | |
tree | cf9ff85b7940e2ffa53ee8503d20201185343e24 /lldb/source/Utility/JSON.cpp | |
parent | 6a391bbf40efb013ac4a5fced7318614a967786a (diff) | |
download | bcm5719-llvm-f2a8bccf8542c3d561e4537b67901ecdb74f4a29.tar.gz bcm5719-llvm-f2a8bccf8542c3d561e4537b67901ecdb74f4a29.zip |
Move StructuredData from Core to Utility
Summary:
It had a dependency on StringConvert and file reading code, which is not
in Utility. I've replaced that code by equivalent llvm operations.
I've added a unit test to demonstrate that parsing a file still works.
Reviewers: zturner, jingham
Subscribers: kubamracek, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D34625
llvm-svn: 306394
Diffstat (limited to 'lldb/source/Utility/JSON.cpp')
-rw-r--r-- | lldb/source/Utility/JSON.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Utility/JSON.cpp b/lldb/source/Utility/JSON.cpp index cb23f140cbf..1520bc7c47e 100644 --- a/lldb/source/Utility/JSON.cpp +++ b/lldb/source/Utility/JSON.cpp @@ -191,7 +191,7 @@ JSONValue::SP JSONArray::GetObject(Index i) { JSONArray::Size JSONArray::GetNumElements() { return m_elements.size(); } -JSONParser::JSONParser(const char *cstr) : StringExtractor(cstr) {} +JSONParser::JSONParser(llvm::StringRef data) : StringExtractor(data) {} JSONParser::Token JSONParser::GetToken(std::string &value) { StreamString error; |