[llvm-commits] [PATCH][System::Path] Add isObjectFile()

Rafael Espindola espindola at google.com
Wed Sep 15 14:39:43 PDT 2010


> I'm still not 100% sure how to treat bitcode files. It will really
> depend on how well they fit the API. What I don't want is to end up
> with special case code everywhere just for bitcode files. Optimally a
> linker would be able to treat it just like every other object file
> during symbol resolution, and then assemble the functions/data that
> matter before layout and output.

Looks a lot like what gold does with plugins, so I agree :-)

> The issue I have with explicitly listing every file type is that
> IdentifyFileType returns more than just MachO or ELF. It also reads
> the headers and tries to figure out a bunch of stuff that I don't care
> about when constructing.
>
> What I would actually prefer is adding enum members like
> ELF_ObjectStart_FileType and ELF_ObjectEnd_FileType. With all the
> subtypes in the middle. That way more file types can be added without
> requiring updating other places that can already deal with whatever is
> being added.
>
> And core files are definitely object files.

Thanks for the explanation. I think the patch is OK, just add a comment that
bitcode files are accepted as object files.

> Thanks for the review!
>
> - Michael Spencer
>

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list