[all-commits] [llvm/llvm-project] 91a98e: [json] Provide a means to delegate writing a value...
Daniel Sanders via All-commits
all-commits at lists.llvm.org
Wed Oct 7 09:36:12 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 91a98ec11e2e001d01c47286bc1721046beeae62
https://github.com/llvm/llvm-project/commit/91a98ec11e2e001d01c47286bc1721046beeae62
Author: Daniel Sanders <daniel_l_sanders at apple.com>
Date: 2020-10-07 (Wed, 07 Oct 2020)
Changed paths:
M llvm/include/llvm/Support/JSON.h
M llvm/lib/Support/JSON.cpp
M llvm/unittests/Support/JSONTest.cpp
Log Message:
-----------
[json] Provide a means to delegate writing a value to another API
(Based on D87170 by dsanders)
I recently had need to call out to an external API to emit a JSON object as part
of one an LLVM tool was emitting. However, our JSON support didn't provide a way
to delegate part of the JSON output to that API.
Add rawValueBegin() and rawValueEnd() to maintain and check the internal state
while something else is writing to the stream. It's the users responsibility to
ensure that the resulting JSON output is still valid.
Differential Revision: https://reviews.llvm.org/D88902
More information about the All-commits
mailing list