This is an archive of the discontinued LLVM Phabricator instance.

Bitcode: Introduce a BitcodeFileContents data type. NFCI.
ClosedPublic

Authored by pcc on Jun 6 2017, 5:56 PM.

Details

Summary

This data type includes the contents of a bitcode file.
Right now a bitcode file can only contain modules, but
a later change will add a symbol table.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Jun 6 2017, 5:56 PM
eugenis accepted this revision.Jun 8 2017, 1:36 PM

LGTM with a nit

llvm/include/llvm/Object/IRObjectFile.h
23 ↗(On Diff #101649)

why is this necessary?

pcc added inline comments.Jun 8 2017, 1:40 PM
llvm/include/llvm/Object/IRObjectFile.h
23 ↗(On Diff #101649)

This header was previously relying on the forward declaration of BitcodeModule in IRSymtab.h. Because I have removed that declaration I need to add it here.

tejohnson added inline comments.Jun 8 2017, 1:46 PM
llvm/include/llvm/Bitcode/BitcodeReader.h
106 ↗(On Diff #101649)

Suggest moving the struct def above the function declaration.

llvm/include/llvm/Object/IRObjectFile.h
73 ↗(On Diff #101649)

Should this use the new type?

pcc added inline comments.Jun 8 2017, 1:48 PM
llvm/include/llvm/Bitcode/BitcodeReader.h
106 ↗(On Diff #101649)

Will do

llvm/include/llvm/Object/IRObjectFile.h
73 ↗(On Diff #101649)

Yes, I'll do the obvious search and replace on these patches when I commit them.

This revision was automatically updated to reflect the committed changes.
pcc marked an inline comment as done.