2016-05-17 22:45:30 +08:00
|
|
|
; Check that changing the output path via prefix-replace works
|
2016-05-17 23:26:13 +08:00
|
|
|
; Use of '/' in paths created here make this unsuitable for Windows.
|
2017-08-16 04:29:24 +08:00
|
|
|
; RUN: mkdir -p %t/oldpath
|
|
|
|
; RUN: opt -module-summary %s -o %t/oldpath/prefix_replace.o
|
2016-05-17 22:45:30 +08:00
|
|
|
; Ensure that there is no existing file at the new path, so we properly
|
|
|
|
; test the creation of the new file there.
|
2017-08-16 04:29:24 +08:00
|
|
|
; RUN: rm -f %t/newpath/prefix_replace.o.thinlto.bc
|
2016-05-17 22:45:30 +08:00
|
|
|
|
2017-08-16 04:29:24 +08:00
|
|
|
; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t/oldpath/prefix_replace.o
|
|
|
|
; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -thinlto-index %t.index.bc %t/oldpath/prefix_replace.o
|
2016-05-17 22:45:30 +08:00
|
|
|
|
2017-08-16 04:29:24 +08:00
|
|
|
; RUN: ls %t/newpath/prefix_replace.o.thinlto.bc
|
2016-05-17 22:45:30 +08:00
|
|
|
|
|
|
|
define void @f() {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|