This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Handle -emit-llvm* in ThinLTO backends
ClosedPublic

Authored by tejohnson on Mar 31 2017, 6:54 AM.

Details

Summary

Use PreCodeGenModuleHook to invoke the correct writer when emitting LLVM
IR, returning false to skip codegen from within thinBackend.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Mar 31 2017, 6:54 AM
pcc edited edge metadata.Mar 31 2017, 12:40 PM

Why not call Module::print() or WriteBitcodeToFile directly instead of creating a pass manager?

tejohnson updated this revision to Diff 93695.Mar 31 2017, 1:05 PM

Implement review suggestions

pcc accepted this revision.Mar 31 2017, 1:09 PM

LGTM

This revision is now accepted and ready to land.Mar 31 2017, 1:09 PM
This revision was automatically updated to reflect the committed changes.