This is an archive of the discontinued LLVM Phabricator instance.

[NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config
ClosedPublic

Authored by mtrofin on Sep 8 2020, 4:44 PM.

Details

Summary

Instead, passing in the command line options, initialized to nullptr. In
an upcoming patch, we can then use the parameter to pass actual command
line options.

Diff Detail

Event Timeline

mtrofin created this revision.Sep 8 2020, 4:44 PM
mtrofin requested review of this revision.Sep 8 2020, 4:44 PM
mtrofin retitled this revision from [NFC][ThinLTO] EmbedBitcodeSection doesn't need the Configuration to [NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config.Sep 8 2020, 4:44 PM

Why not just make this one an NFC change to remove the unused Conf parameter. Then pass in CmdLineOpts in the patch where its use is added?

mtrofin updated this revision to Diff 290611.Sep 8 2020, 4:54 PM

feedback

Why not just make this one an NFC change to remove the unused Conf parameter. Then pass in CmdLineOpts in the patch where its use is added?

Oh, yes! Thanks - done.

tejohnson added inline comments.Sep 8 2020, 4:58 PM
llvm/lib/LTO/LTOBackend.cpp
362

Why this change? Now Buf is unused.

mtrofin updated this revision to Diff 290615.Sep 8 2020, 5:11 PM

removed unrelated change

mtrofin marked an inline comment as done.Sep 8 2020, 5:11 PM
mtrofin added inline comments.
llvm/lib/LTO/LTOBackend.cpp
362

Oh - fixed. I was going to do that next and forgot to undo the change. Turns out, llvm::EmbedBitcodeInModule handles that case - i.e. if you pass an invalid memory buffer, it will extract it from the provided Module. Separate change, in any case.

This revision is now accepted and ready to land.Sep 8 2020, 5:13 PM
This revision was landed with ongoing or failed builds.Sep 8 2020, 5:15 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked an inline comment as done.