[PATCH] D31921: Object: Factor out the code for creating the irsymtab for an arbitrary bitcode file.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 11:26:56 PDT 2017


pcc added a comment.

In https://reviews.llvm.org/D31921#769375, @tejohnson wrote:

> In https://reviews.llvm.org/D31921#769284, @pcc wrote:
>
> > In https://reviews.llvm.org/D31921#769264, @tejohnson wrote:
> >
> > > No, but I may be missing something... Why can't there be a single call into irsymtab to a function that takes the BFC, and returns a structure containing the Reader, Strtab, and Symtab to use in the File being created? I.e. using those in the BFC if no upgrade needed, or doing the upgrade if necessary.
> >
> >
> > That is basically the same as what `irsymtab::read` is doing in https://reviews.llvm.org/D32061, right? I think the only difference is that `irsymtab::read` would be taking a list of BitcodeModules rather than returning a list of BitcodeModules. And we'd be adding a function in IRObjectFile that converts from that interface to the current `irsymtab::read` interface.
>
>
> Right - essentially the main interface to the File creation is in IRObjectFile, which handles the creation of the BitcodeModules. To me that seems preferable.


I still don't understand why you think that interface is better, but I have made the changes that you have requested.


https://reviews.llvm.org/D31921





More information about the llvm-commits mailing list