[LLVMdev] [lld] Handling a whole bunch of readers

Shankar Easwaran shankare at codeaurora.org
Wed Oct 9 19:57:50 PDT 2013


On 10/9/2013 4:19 PM, Shankar Easwaran wrote:
> On 10/9/2013 3:09 PM, Nick Kledzik wrote:
>> On Oct 9, 2013, at 11:23 AM, Shankar Easwaran 
>> <shankare at codeaurora.org> wrote:
>>> We have a whole bunch of readers(we would have some more too), and 
>>> was thinking if we should have a vector of Readers, and have a 
>>> function isMyFormat in each of them.
>>>
>>> Any reader that knows to handle, goes ahead and parses the file.
>>>
>>> On a side note, we currently use .objtxt as an figure out if the 
>>> file is a YAML file or not. I have added FIXME's in the code, if we 
>>> could some kind of magic (or) a better way to figure out if the file 
>>> is YAML ?
>> On this topic, we should come up with standard file extension names.  
>> I made up .objtxt for atoms-in-yaml when writing the first test 
>> cases.  We will soon need extensions for other kinds of yaml files 
>> (such as mach-o in yaml).   With linker scripts we are stuck with 
>> there being no magic at the start and no standard file extension.  
>> For new yaml files that we are inventing we should define a standard 
>> file extension.
> Isnt having a YAML file starting with the below better, so that you 
> dont need to go through file extensions.
>
> magic :
> arch:
>
> You would also be able to figure out if the yaml file is a valid input 
> for the flavor/target too.

Ping ?

Shankar Easwaran



More information about the llvm-dev mailing list