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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 16:03:35 PDT 2017


tejohnson added a comment.

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.


https://reviews.llvm.org/D31921





More information about the llvm-commits mailing list