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

Sean Silva chisophugis at gmail.com
Mon Oct 14 18:20:13 PDT 2013


On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <bigcheesegs at gmail.com>wrote:

> On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran <shankare at codeaurora.org
> > wrote:
>
>> Hi,
>>
>> 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 ?
>>
>> Thanks
>>
>> Shankar Easwaran
>>
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>> by the Linux Foundation
>>
>>
> So apparently I didn't reply all when I suggested this.
>
> For determining which YAML reader to use, we should use YAML tags. This
> allows multiple different types of input files in a single YAML stream.
>
> !archive
> <blah>
> ---
> !ELF
> <blah>
> ---
> !atoms
> <blah>
>
> For differentiating between linker scripts and YAML, I agree that some
> form of comment magic is best.
>

Since our YAML stuff is all internal anyway, wouldn't it be simpler to just
hardcode the limited set of extensions we use for YAML files, and only do
that with non-emulated drivers unless explicitly asked to do so?

-- Sean Silva

>
> - Michael Spencer
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131014/53c2ae21/attachment.html>


More information about the llvm-dev mailing list