[PATCH] D19644: [ThinLTO] Option to control path of distributed backend files

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 18:40:17 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D19644#421629, @joker.eph wrote:

> Can this be exposed to `llvm-lto` as well? It'll help testing when refactoring everything behind a new API.


I wasn't sure the best way to do that initially, but thinking some more I think this is what I can do: In http://reviews.llvm.org/D19556 (individual index files) I will sink the lifetime of the raw_fd_ostream into WriteIndexToFile (similar to how it is done within EmitImportsFiles in http://reviews.llvm.org/D19636). Then I can move getOutputModulePath into FunctionImport.cpp as well, and just pass the new and old prefix into those routines and do the replacement there before opening the files.


================
Comment at: test/tools/gold/X86/thinlto_prefix_replace.ll:13
@@ +12,3 @@
+; RUN: ls -l %T/newpath/thinlto_prefix_replace.o.thinlto.bc | FileCheck %s
+; CHECK: thinlto_prefix_replace.o.thinlto.bc
+
----------------
joker.eph wrote:
> I think you can just write `ls %T/newpath/thinlto_prefix_replace.o.thinlto.bc` without any FileCheck, it should be enough to test the existence of the file.
Ok, will give that a try.


http://reviews.llvm.org/D19644





More information about the llvm-commits mailing list