[llvm-commits] [PATCH] yaml2obj: A utility to convert YAML to binaries.

Marshall Clow mclow.lists at gmail.com
Mon May 21 20:07:53 PDT 2012


On May 21, 2012, at 12:52 PM, Michael Spencer wrote:

> On Mon, May 14, 2012 at 3:54 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
>> Add yaml2obj. A utility to convert YAML to binaries.
>> 
>> yaml2obj takes a textual description of an object file in YAML format
>> and outputs the binary equivalent to stdout. This greatly simplifies writing
>> tests that take binary object files as input.
>> 
>> The attached patch adds this tool for a subset of COFF and includes
>> documentation.
>> 
>> I plan to add support for PE, ELF, and MachO. This helps with both
>> LLVMObject and lld tests.
>> 
>> - Michael Spencer
> 
> Ping and updated patch that applies cleanly to trunk.

In yaml2obj.cpp:
+ typename llvm::enable_if_c<std::numeric_limits<T>::is_integer, bool>::type
-  typename std::enable_if<std::numeric_limits<T>::is_integer, bool>::type

I did not spend much time looking at the "WriteCOFF" infrastructure in yaml2obj.cpp, since it's just there as a "getting started", and will be tossed out asap.
It seems to work well enough for the moment.

Other than that, LGTM.

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the llvm-commits mailing list