This is an archive of the discontinued LLVM Phabricator instance.

[lto] Add beginning of -save-temps option.
ClosedPublic

Authored by silvas on Mar 9 2016, 11:52 AM.

Details

Summary

This is useful for debugging issues with LTO.
The option follows the analogous option in ld64 and the gold plugin (per
Rafael's suggestion).

For starters, this only dumps the combined bitcode file.
In a future patch I will add dumping for the .o file.

The naming of the output follows ld64's convention which is slightly more
consistent IMO (consistent .lto.<extension> for all the files).

Diff Detail

Event Timeline

silvas updated this revision to Diff 50171.Mar 9 2016, 11:52 AM
silvas retitled this revision from to [lto] Add beginning of -save-temps option..
silvas updated this object.
silvas added reviewers: rafael, ruiu.
silvas added subscribers: llvm-commits, Bigcheese.
ruiu accepted this revision.Mar 9 2016, 12:03 PM
ruiu edited edge metadata.

We generally don't add much code for debugging, but since the amount of code for this is small, this should be okay.

ELF/SymbolTable.cpp
150

Add a comment that this function is for debugging.

167

Instead of creating a file name here, I'd do that in saveBCFile.

This revision is now accepted and ready to land.Mar 9 2016, 12:03 PM
This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Mar 9 2016, 12:06 PM

Did you miss my comments?

silvas added a subscriber: silvas.Mar 9 2016, 12:07 PM

Oops, sorry, will fix up.

r263057, sorry about that.