diff options
author | Tim Renouf <tpr@botech.co.uk> | 2020-05-18 14:13:57 +0100 |
---|---|---|
committer | Tim Renouf <tpr.ll@botech.co.uk> | 2020-05-21 22:13:19 +0100 |
commit | db16eb33ce43792e0758edf958bbb175eb6a60e2 (patch) | |
tree | 2452f245890fe6717e9bcfb2dec6c7aa2cfc0fb2 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 7019cea26dfef5882c96f278c32d0f9c49a5e516 (diff) | |
download | llvm-db16eb33ce43792e0758edf958bbb175eb6a60e2.zip llvm-db16eb33ce43792e0758edf958bbb175eb6a60e2.tar.gz llvm-db16eb33ce43792e0758edf958bbb175eb6a60e2.tar.bz2 |
[MsgPack] Added convenience assignment to MsgPackDocument
This commit increases the convenience of using the MsgPackDocument API,
especially when creating a document for writing out.
It adds direct assignment of bool, integer and string types to a
DocNode, as long as that DocNode is already inside a document, e.g. the
result of a map lookup. It also adds map lookup given an integer type
(it already had that for string).
So, to assign a string to a map element whose key is an int, you can
now write
MyMap[42] = "towel";
instead of
MyMap[MyMap.getDocument()->getNode(42)] =
MyMap.getDocument()->getNode("towel");
Also added MapDocNode::erase methods.
Differential Revision: https://reviews.llvm.org/D80121
Change-Id: I17301fa15bb9802231c52542798af5b54beb583e
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions