[ThinLTO] Fix temp file dumping, enable via llvm-lto and test it
authorTeresa Johnson <tejohnson@google.com>
Mon, 15 Aug 2016 23:24:57 +0000 (23:24 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 15 Aug 2016 23:24:57 +0000 (23:24 +0000)
commitc44a12244f3855660d8244152eb40da4d853289e
tree0716d21a1408f7f424b546fa7bbaf34eb763c6e9
parent6b7d8c294429c25e225b87769e4381659dc3bbb0
[ThinLTO] Fix temp file dumping, enable via llvm-lto and test it

Summary:
Fixed a bug in ThinLTOCodeGenerator's temp file dumping. The Twine
needs to be passed directly as an argument, or a copy saved into a
std::string.

It doesn't seem there are any consumers of this, so I added a new option
to llvm-lto to enable saving of temp files during ThinLTO, and augmented
a test to use it to check post-import but pre-opt bitcode.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23525

llvm-svn: 278761
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/test/ThinLTO/X86/linkonce_resolution_comdat.ll
llvm/tools/llvm-lto/llvm-lto.cpp