[llvm-commits] [PATCH] YAML I/O for review

Nick Kledzik kledzik at apple.com
Tue Dec 4 13:25:37 PST 2012


Attached is a patch to add functionality to llvm to aid in the conversion between in-memory data structures and YAML text files.  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: yamlio.patch
Type: application/octet-stream
Size: 111201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121204/a585402f/attachment.obj>
-------------- next part --------------


The patch includes the implementation, test cases, and documentation. 

I've included a PDF of the documentation, so you don't have to install the patch and run sphinx to read it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: YAMLIO.pdf
Type: application/pdf
Size: 169362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121204/a585402f/attachment.pdf>
-------------- next part --------------



Back in August I proposed a different implementation that required all in-memory data structure to derive from some yaml classes I had defined.  It was suggested that using a traits based approach could eliminate that intrusiveness and allow YAML I/O to work with any existing data structures by defining template specializations on the existing data types.   Doing that was straight forward with C++11, but getting it to work with older C++ compilers was challenging.  I finally found an alternate way to do the trait testing that should work with all C++ compilers.

-Nick






More information about the llvm-commits mailing list