[PATCH] D28083: Add an index for Module Metadata record in the bitcode

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 10:46:18 PST 2016


mehdi_amini added a comment.

In https://reviews.llvm.org/D28083#631799, @mehdi_amini wrote:

> In https://reviews.llvm.org/D28083#631731, @tejohnson wrote:
>
> > I think it would be useful to add a BitcodeReader change though to parse the index offset record and sanity check against the offset of the index record when it is later encountered.
>
>
> Good idea, will do!


It does not fit well: when I get in the switch case for the index I already read the index record, and the bitcode position has moved so I can't use it to validate. It would require to always save the position before every record and thread it through a function call, which seems overkill for this. I'm leaning toward adding a llvm-bcanalyzer check instead.


https://reviews.llvm.org/D28083





More information about the llvm-commits mailing list