[PATCH] D48175: [BinaryFormat] Add MsgPackTypes

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 12:28:58 PDT 2018


scott.linder added a comment.

The use I have in mind is actually an external component which depends on LLVM. We currently implement reading MessagePack metadata there, but when we land the changes to generate it in LLVM it would be nice to avoid duplicating the code there.

The rationale for a shared_ptr tree is that our API hands out opaque handles to sub-trees in the metadata which have their own lifetime independent of the root. With shared_ptr this just naturally falls out, but with unique_ptr it requires some book-keeping.

I do not see a scenario where the shared_ptr will be needed in LLVM, so if you prefer I am happy to update the patch to use unique_ptr.


https://reviews.llvm.org/D48175





More information about the llvm-commits mailing list