[PATCH] D56046: Output ELF files after ThinLTO is run.

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 4 15:30:26 PST 2019


void marked an inline comment as done.
void added inline comments.


================
Comment at: ELF/LTO.cpp:225
+
+class raw_multi_ostream : public llvm::raw_svector_ostream {
+  std::unique_ptr<raw_pwrite_stream> OS;
----------------
ruiu wrote:
> I don't think we need this kind of sophisticated abstraction. I believe you can just write Buf contents to files after data is written to Buf. Please take a look at https://gist.github.com/rui314/836cc9dab97922271b63dba3d1d5a3f5. All tests still pass with that patch.
> 
> So, if my understanding is correct, the only difference between save-temps and obj-path is the basename of the created temporary files. Is this your expected behavior?
I implemented your suggestion here. The two options are similar, but have some important differences; save-temps outputs a lot of intermediate bitcode files. A new basename is good because it allows you to place the temps in a different directory. It might be possible to combine the two somehow?


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56046/new/

https://reviews.llvm.org/D56046





More information about the llvm-commits mailing list