summaryrefslogtreecommitdiff
path: root/llvm/lib/BinaryFormat/MsgPackDocument.cpp
AgeCommit message (Collapse)Author
2023-11-28[MsgPack] Handle Expected<T> errors in document reader (#73183)Emma Pilkington
This was causing an assert on invalid in the modified test case.
2023-04-20[MsgPack] Add support for writing binary ELF doc nodesMartin Dinkov
Will be used for a front-end compiler https://github.com/GPUOpen-Drivers/llpc to insert a binary blob value into AMDGPU PAL metadata. Differential Revision: https://reviews.llvm.org/D148607 Change-Id: I90685883d1478335937218e6b1a569b1b26dc05a
2020-10-27msgpack: Improve error for empty nodeSebastian Neubauer
2020-05-21[MsgPack] Added convenience assignment to MsgPackDocumentTim Renouf
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
2020-05-21[MsgPack] MsgPackDocument::readFromBlob now mergesTim Renouf
The readFromBlob method can now be used to read MsgPack into a Document that already contains something, merging the two. There is a new Merger argument to readFromBlob, a callback function to resolve conflicts. Differential Revision: https://reviews.llvm.org/D79671 Change-Id: Icf3e959217fe33cd907a41516c0386aef2847c0c
2019-03-13[MsgPack] New MsgPackDocument classTim Renouf
Summary: A class that exposes a simple in-memory representation of a document of MsgPack objects, that can be read from and written to MsgPack, read from and written to YAML, and inspected and modified in memory. This is intended to be a lighter-weight (in terms of memory allocations) replacement for MsgPackTypes. Two subsequent changes will: 1. switch AMDGPU HSA metadata to using MsgPackDocument instead of MsgPackTypes; 2. add MsgPack AMDGPU PAL metadata via MsgPackDocument. Differential Revision: https://reviews.llvm.org/D57023 Change-Id: Ie15a054831d5a6467c5867c064c8f8f6b80270e1 llvm-svn: 356080